We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was following this tutorial in creating hello-prisma in https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch/relational-databases-typescript-prismaPostgres?utm_source=cli&utm_medium=promo-generate-v5-17&utm_campaign=--optimize
On running node index.js, I was met with the error message MODULE_NOT_FOUND. Full error log below.
node index.js
MODULE_NOT_FOUND
Remove the output field(comment out) from generator client in schema.prisma and rerun npx generate prisma
output
generator client
schema.prisma
npx generate prisma
generator client { provider = "prisma-client-js" // output = "../generated/prisma" } datasource db { provider = "postgresql" url = env("DATABASE_URL") }
Full error logs:
rushil@Rushil:~/code/hello-prisma$ node index.js node:internal/modules/cjs/loader:1252 throw err; ^ Error: Cannot find module '.prisma/client/default' Require stack: - /home/rushil/code/hello-prisma/node_modules/@prisma/client/default.js - /home/rushil/code/hello-prisma/index.js at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15) at Function._load (node:internal/modules/cjs/loader:1075:27) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:219:24) at Module.require (node:internal/modules/cjs/loader:1340:12) at require (node:internal/modules/helpers:138:16) at Object.<anonymous> (/home/rushil/code/hello-prisma/node_modules/@prisma/client/default.js:2:6) at Module._compile (node:internal/modules/cjs/loader:1565:14) at Object..js (node:internal/modules/cjs/loader:1708:10) at Module.load (node:internal/modules/cjs/loader:1318:32) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/rushil/code/hello-prisma/node_modules/@prisma/client/default.js', '/home/rushil/code/hello-prisma/index.js' ] } Node.js v22.12.0
The text was updated successfully, but these errors were encountered:
The exact page where the command node index.js is https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch/relational-databases/querying-the-database-node-postgresql?utm_source=cli&utm_medium=promo-generate-v5-17&utm_campaign=--optimize
Sorry, something went wrong.
No branches or pull requests
I was following this tutorial in creating hello-prisma in https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch/relational-databases-typescript-prismaPostgres?utm_source=cli&utm_medium=promo-generate-v5-17&utm_campaign=--optimize
On running
node index.js
, I was met with the error messageMODULE_NOT_FOUND
. Full error log below.What fixed the issue for me:
Remove the
output
field(comment out) fromgenerator client
inschema.prisma
and rerunnpx generate prisma
Full error logs:
The text was updated successfully, but these errors were encountered: