Skip to content
New issue

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

prisma studio error after installing latest version #732

Closed
Manubi opened this issue Jul 13, 2021 · 5 comments
Closed

prisma studio error after installing latest version #732

Manubi opened this issue Jul 13, 2021 · 5 comments
Assignees
Milestone

Comments

@Manubi
Copy link

Manubi commented Jul 13, 2021

  1. Prisma version (prisma -v or npx prisma -v):
    prisma version 2.25.0
    prisma studio version 0.410.0

I just saw from the release that the latest version is shipping with prisma 2.26.0. If that's the error your auto update to the latest version is bad if it's not backwards compatible.

  1. Logs from Developer Tools Console or Command line, if any:
Error starting Prisma Client: {
  "message": "\n    Error: Generator at /utils/stub-generator.js could not start:\n    internal/modules/cjs/loader.js:890\n      throw err;\n      ^\n    Error: Cannot find module '/utils/stub-generator.js'\n        at Function.f._load (electron/js2c/asar_bundle.js:5:12684)\n        at internal/main/run_main_module.js:17:47 {\n      code: 'MODULE_NOT_FOUND',\n      requireStack: []\n    }\n        at Timeout._onTimeout (/Applications/Prisma Studio.app/Contents/Resources/app.asar/node_modules/@prisma/generator-helper/dist/GeneratorProcess.js:92:32)",
  "stack": "AggregateError: \n    Error: Generator at /utils/stub-generator.js could not start:\n    internal/modules/cjs/loader.js:890\n      throw err;\n      ^\n    Error: Cannot find module '/utils/stub-generator.js'\n        at Function.f._load (electron/js2c/asar_bundle.js:5:12684)\n        at internal/main/run_main_module.js:17:47 {\n      code: 'MODULE_NOT_FOUND',\n      requireStack: []\n    }\n        at Timeout._onTimeout (/Applications/Prisma Studio.app/Contents/Resources/app.asar/node_modules/@prisma/generator-helper/dist/GeneratorProcess.js:92:32)\n    at next (/Applications/Prisma Studio.app/Contents/Resources/app.asar/node_modules/p-map/index.js:43:14)\n    at /Applications/Prisma Studio.app/Contents/Resources/app.asar/node_modules/p-map/index.js:67:7"
}
Error: Error starting Prisma Client: {
  "message": "\n    Error: Generator at /utils/stub-generator.js could not start:\n    internal/modules/cjs/loader.js:890\n      throw err;\n      ^\n    Error: Cannot find module '/utils/stub-generator.js'\n        at Function.f._load (electron/js2c/asar_bundle.js:5:12684)\n        at internal/main/run_main_module.js:17:47 {\n      code: 'MODULE_NOT_FOUND',\n      requireStack: []\n    }\n        at Timeout._onTimeout (/Applications/Prisma Studio.app/Contents/Resources/app.asar/node_modules/@prisma/generator-helper/dist/GeneratorProcess.js:92:32)",
  "stack": "AggregateError: \n    Error: Generator at /utils/stub-generator.js could not start:\n    internal/modules/cjs/loader.js:890\n      throw err;\n      ^\n    Error: Cannot find module '/utils/stub-generator.js'\n        at Function.f._load (electron/js2c/asar_bundle.js:5:12684)\n        at internal/main/run_main_module.js:17:47 {\n      code: 'MODULE_NOT_FOUND',\n      requireStack: []\n    }\n        at Timeout._onTimeout (/Applications/Prisma Studio.app/Contents/Resources/app.asar/node_modules/@prisma/generator-helper/dist/GeneratorProcess.js:92:32)\n    at next (/Applications/Prisma Studio.app/Contents/Resources/app.asar/node_modules/p-map/index.js:43:14)\n    at /Applications/Prisma Studio.app/Contents/Resources/app.asar/node_modules/p-map/index.js:67:7"
}
    at ki.init (file:///Applications/Prisma%20Studio.app/Contents/Resources/app.asar/renderer/assets/index.js:1:103816)
  1. Does the issue persist even after updating to the latest prisma alpha? (npm i -D @prisma/cli@dev)
    No Idea as I shouldn't update because I am using nexus-prisma.
@janpio
Copy link
Member

janpio commented Jul 13, 2021

What is /utils/stub-generator.js in the context of your project?

Possibly related to custom generator problems, #730

@Manubi
Copy link
Author

Manubi commented Jul 14, 2021

What is /utils/stub-generator.js in the context of your project?

Possibly related to custom generator problems, #730

There is no stub-generator.js in my whole project. No idea why it's asking for it.
I am using nexus-prisma and the previewFeature ["orderByRelation"] if it changes anything...

npx prisma studio works fine.
postico works also fine.

@janpio
Copy link
Member

janpio commented Jul 14, 2021

Related #720

@sdnts
Copy link
Contributor

sdnts commented Jul 14, 2021

The stub-generator file is from Studio. Checking out why that is missing is top priority for me today.
This is definitely the same issue as #720. but I'll keep this open so I can verify if my fix works on the desktop app as well!

@sdnts sdnts self-assigned this Jul 15, 2021
@sdnts sdnts added this to the 2.28.0 milestone Jul 15, 2021
@sdnts
Copy link
Contributor

sdnts commented Jul 15, 2021

Hey @Manubi, I've just released a dev version (2.28.0-dev.5) that should fix this. Could you install it (npm i prisma@dev @prisma/client@dev) and give this another try?

Do note that dev versions are pre-release, and so they might occasionally contain unannounced breaking changes. I wouldn't recommend sticking to this version for your production app. This fix will make it to the next stable Prisma release though (scheduled for July 27th) at which point it should be safe to update.

Let me know if you're still seeing this!

@sdnts sdnts closed this as completed Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants