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:Jump to 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
12 Replies
Restarting PyCharm(WebStorm) didn't help.
Restarting Typescript service didn't help.
The repo link: https://github.com/yatochka-dev/yatochka
GitHub
GitHub - yatochka-dev/yatochka
Contribute to yatochka-dev/yatochka development by creating an account on GitHub.
seems like you forgot to run
pnpm prisma generate
I did that many times already, and tried to do it one more time rn.
Didn't work.
I cloned your repo, did
pnpm install
and pnpm prisma generate
and there is no errorI did the same thing now, and there's still an issue
maybe some dependency issue, try deleting node_modules and reinstall everything with npm
Still the same thing.
I tried opening the same project in VS code, everything seems to work fine:
Okay, that's very weird
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
TYPPEESS