studio icon indicating copy to clipboard operation
studio copied to clipboard

Bug: Can't find `node_modules/@prisma/cli/index.js` (Failed to generate Prisma Client)

Open nickreynke opened this issue 6 years ago • 3 comments

  1. Prisma2 version (prisma -v):
Environment variables loaded from ./prisma/.env
@prisma/cli          : 2.0.0-beta.4
Current platform     : darwin
Query Engine         : query-engine afd294205618b1c825b013ba6f5a6ebe4aa4a514 (at /Users/nickreynke/xxx/node_modules/@prisma/cli/query-engine-darwin)
Migration Engine     : migration-engine-cli afd294205618b1c825b013ba6f5a6ebe4aa4a514 (at /Users/nickreynke/xxx/node_modules/@prisma/cli/migration-engine-darwin)
Introspection Engine : introspection-core afd294205618b1c825b013ba6f5a6ebe4aa4a514 (at /Users/nickreynke/xxx/node_modules/@prisma/cli/introspection-engine-darwin)
  1. Logs from Developer Tools Console, if any:
> prisma studio --experimental

Environment variables loaded from ./prisma/.env
Generating Prisma Client ... Failed to generate Prisma Client: GeneratorError: Error: ENOENT: no such file or directory, copyfile '/Users/nickreynke/xxx/node_modules/@prisma/cli/index.js' -> '/Users/nickreynke/.cache/prisma/studio/xxx/index.js'
    at GeneratorProcess.handleResponse (/Users/nickreynke/xxx/node_modules/@prisma/cli/build/index.js:2:2807165)
    at LineStream.<anonymous> (/Users/nickreynke/xxx/node_modules/@prisma/cli/build/index.js:2:2806803)
    at LineStream.emit (events.js:311:20)
    at LineStream.EventEmitter.emit (domain.js:482:12)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at LineStream.Readable.push (_stream_readable.js:209:10)
    at LineStream.Transform.push (_stream_transform.js:152:32)
    at LineStream._pushBuffer (/Users/nickreynke/xxx/node_modules/@prisma/cli/build/index.js:2:2979140)
    at LineStream._transform (/Users/nickreynke/xxx/node_modules/@prisma/cli/build/index.js:2:2978959) {
  code: -32000,
  data: null
}
  1. Does the issue persist even after updating to the latest prisma alpha? (npm i -D @prisma/cli@alpha)

With @prisma/[email protected]? Yes. Same error.

nickreynke avatar May 01 '20 19:05 nickreynke

I'm experiencing the same issue with "@prisma/cli": "^2.0.0-beta.4"

franknwankwo avatar May 01 '20 22:05 franknwankwo

Hey @nickreynke @franknwankwo I was seeing this as well. I just pushed out 2.0.0-alpha.1179, could you try that out and let me know if this is fixed for you?

sdnts avatar May 01 '20 23:05 sdnts

Hey @nickreynke @franknwankwo I was seeing this as well. I just pushed out 2.0.0-alpha.1179, could you try that out and let me know if this is fixed for you?

Yup, this fixed it for me.

franknwankwo avatar May 02 '20 00:05 franknwankwo