← All fixes
@prisma/client did not initialize yet. Please run "prisma generate"
#130Error
Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
Why it happens, and why this works
The Prisma Client code is generated from schema.prisma and hasn't been generated in this environment yet (fresh clone, new CI/host, or after changing the schema).
Fix
Run npx prisma generate (and npx prisma migrate dev locally after schema changes). Add "postinstall": "prisma generate" so it happens on every install and deploy. If you set a custom output in the generator, import the client from that path.
Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
ImportError: cannot import name from partially initialized module (circular import)
#52ImportError: cannot import name 'User' from partially initialized module 'models' (most likely due to a circular import). Python 3.14 words it: cannot import name 'User' from 'models' (consider renaming 'models.py' if it has the same name as a library you intended to import)
pythonVerifiedNo reports yet
TS1484: 'User' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled
#91error TS1484: 'User' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
typescriptviteVerifiedNo reports yet
Importing a JSON file in ESM fails: needs an import attribute of type json
#26TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module "file:///app/config.json" needs an import attribute of "type: json"
nodeVerifiedNo reports yet