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

Fatal error on latest version (0.410.0) on Windows #725

Closed
miltonbecker opened this issue Jul 8, 2021 · 6 comments
Closed

Fatal error on latest version (0.410.0) on Windows #725

miltonbecker opened this issue Jul 8, 2021 · 6 comments
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug.
Milestone

Comments

@miltonbecker
Copy link

This happens only on the latest studio version - 0.410.0.

When I click on a project I get this:

image

The error details are:

Error starting Prisma Client: {
  "message": "\n    Error: spawn typegraphql-prisma ENOENT\n        at notFoundError (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:6:26)\n        at verifyENOENT (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:40:16)\n        at ChildProcess.cp.emit (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:27:25)",
  "stack": "AggregateError: \n    Error: spawn typegraphql-prisma ENOENT\n        at notFoundError (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:6:26)\n        at verifyENOENT (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:40:16)\n        at ChildProcess.cp.emit (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:27:25)\n    at next (C:\\Users\\myuser\\AppData\\Local\\Programs\\@prismastudio-electron\\resources\\app.asar\\node_modules\\p-map\\index.js:43:14)\n    at C:\\Users\\myuser\\AppData\\Local\\Programs\\@prismastudio-electron\\resources\\app.asar\\node_modules\\p-map\\index.js:59:6\n    at processTicksAndRejections (internal/process/task_queues.js:93:5)"
}
Error: Error starting Prisma Client: {
  "message": "\n    Error: spawn typegraphql-prisma ENOENT\n        at notFoundError (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:6:26)\n        at verifyENOENT (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:40:16)\n        at ChildProcess.cp.emit (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:27:25)",
  "stack": "AggregateError: \n    Error: spawn typegraphql-prisma ENOENT\n        at notFoundError (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:6:26)\n        at verifyENOENT (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:40:16)\n        at ChildProcess.cp.emit (C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/node_modules/cross-spawn/lib/enoent.js:27:25)\n    at next (C:\\Users\\myuser\\AppData\\Local\\Programs\\@prismastudio-electron\\resources\\app.asar\\node_modules\\p-map\\index.js:43:14)\n    at C:\\Users\\myuser\\AppData\\Local\\Programs\\@prismastudio-electron\\resources\\app.asar\\node_modules\\p-map\\index.js:59:6\n    at processTicksAndRejections (internal/process/task_queues.js:93:5)"
}
    at ki.init (file:///C:/Users/myuser/AppData/Local/Programs/@prismastudio-electron/resources/app.asar/renderer/assets/index.js:1:103816)

When I dowgrade to version 0.394.0 it works again.

@janpio
Copy link
Member

janpio commented Jul 8, 2021

What does your schema.prisma file look like? Seems the customer generator typegraphql-prisma is causing a problem here somehow.

@miltonbecker
Copy link
Author

Not sure that's a good idea - it's a production app and there are a few hidden fields.
Anything specific you want to look at?
There are a few enums, several models and quite a lot of relations.

The beginning is like this:

generator client {
  provider = "prisma-client-js"
}

generator typegraphql {
  provider = "typegraphql-prisma"
}

datasource db {
  provider = "postgresql"
  url      = env("DB_URL")
}

@janpio
Copy link
Member

janpio commented Jul 8, 2021

That might already be enough - thanks.

@miltonbecker
Copy link
Author

Oh this might also be important: I'm running the studio on Windows but the schema.prisma is on the WSL - so the filepath to the schema starts with \\wsl$\Ubuntu-20.04.

@sdnts
Copy link
Contributor

sdnts commented Jul 9, 2021

I'll check this out soon and let you know what I find

@sdnts sdnts added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. labels Jul 9, 2021
@sdnts sdnts added this to the 2.28.0 milestone Jul 15, 2021
@sdnts
Copy link
Contributor

sdnts commented Jul 15, 2021

Hey @miltonbecker this was likely happening on the Prisma CLI as well, right?

I've just pushed out a fix for the CLI that should fix this. You'll need to install a dev version of the CLI to check this out. (npm i prisma@dev @prisma/client@dev).

Do note that the dev versions are mostly meant for internal use, so I wouldn't recommend using it in a production app. This fix will also land on 2.28.0 (scheduled for July 27th).

I've also just released a new version of the Electron app, and this should be fixed on there as well. Let me know if you still see issues!

@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
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

3 participants