Weird bug? Can't import {PrismaClient} from @prisma/client

The problem is only with typescript I guess, because the code I wrote works perfectly. pic 1 - my schema pic 2 - db.ts pic 3 - api/hello.ts pic 4 - api/hello response Note: I created a few instances of Example model using prisma studio. Note 2 : Project created with prisma + tailwind + pnpm + @/* + typescript
Solution:
I updated my IDE(PyCharm - same thing as webstorm but with python support) from 2022.2 to 2023.1, and the bug is no more present
Jump to solution
12 Replies
Yatochka
Yatochka2y ago
Restarting PyCharm(WebStorm) didn't help. Restarting Typescript service didn't help.
Yatochka
Yatochka2y ago
GitHub
GitHub - yatochka-dev/yatochka
Contribute to yatochka-dev/yatochka development by creating an account on GitHub.
Matvey
Matvey2y ago
seems like you forgot to run pnpm prisma generate
Yatochka
Yatochka2y ago
I did that many times already, and tried to do it one more time rn. Didn't work.
Matvey
Matvey2y ago
I cloned your repo, did pnpm install and pnpm prisma generate and there is no error
Yatochka
Yatochka2y ago
I did the same thing now, and there's still an issue
Matvey
Matvey2y ago
maybe some dependency issue, try deleting node_modules and reinstall everything with npm
Yatochka
Yatochka2y ago
Still the same thing.
Yatochka
Yatochka2y ago
I tried opening the same project in VS code, everything seems to work fine:
Yatochka
Yatochka2y ago
Okay, that's very weird
Solution
Yatochka
Yatochka2y ago
I updated my IDE(PyCharm - same thing as webstorm but with python support) from 2022.2 to 2023.1, and the bug is no more present
Yatochka
Yatochka2y ago
TYPPEESS
Want results from more Discord servers?
Add your server