react-apollo icon indicating copy to clipboard operation
react-apollo copied to clipboard

@prisma/client did not initialize yet.

Open bpinazmul18 opened this issue 2 years ago • 0 comments

Title: Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.

some info: os: ubuntu 22.04 node: node19

package.json

"dependencies": {
    "@prisma/client": "^3.7.0",
    "apollo-server": "^2.19.0",
    "bcryptjs": "2.4.3",
    "jsonwebtoken": "8.5.1"
  },
  "devDependencies": {
    "prisma": "^3.7.0",
    "nodemon": "^2.0.6"
  }

description: When I start apollo-server using yarn start then show Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.

my terminal says:

yarn start
yarn run v1.22.19
$ node src/index.js
/var/www/react-apollo/server/node_modules/.prisma/client/index.js:3
    throw new Error(
    ^

Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues
    at new PrismaClient (/var/www/react-apollo/server/node_modules/.prisma/client/index.js:3:11)
    at Object.<anonymous> (/var/www/react-apollo/server/src/index.js:15:16)
    at Module._compile (node:internal/modules/cjs/loader:1246:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1300:10)
    at Module.load (node:internal/modules/cjs/loader:1103:32)
    at Module._load (node:internal/modules/cjs/loader:942:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47

Node.js v19.6.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

How to fix this issue? I'm a noob dev. Plzzzzzzzz helps me.

bpinazmul18 avatar Feb 13 '23 14:02 bpinazmul18