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
Studio startup doesn't work (ENOENT) #415
Comments
Facing the exact same issue here. I can run yarn run v1.22.4
$ /Users/guilherme/workspace/personal/valorant-plays/server/node_modules/.bin/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/guilherme/workspace/personal/valorant-plays/server/node_modules/@prisma/cli/index.js' -> '/Users/guilherme/.cache/prisma/studio/Users-guilherme-workspace-personal-valorant-plays-server/index.js'
at GeneratorProcess.handleResponse (/Users/guilherme/workspace/personal/valorant-plays/server/node_modules/@prisma/cli/build/index.js:2:2807165)
at LineStream.<anonymous> (/Users/guilherme/workspace/personal/valorant-plays/server/node_modules/@prisma/cli/build/index.js:2:2806803)
at LineStream.emit (events.js:321:20)
at LineStream.EventEmitter.emit (domain.js:485:12)
at addChunk (_stream_readable.js:305:12)
at readableAddChunk (_stream_readable.js:280:11)
at LineStream.Readable.push (_stream_readable.js:214:10)
at LineStream.Transform.push (_stream_transform.js:152:32)
at LineStream._pushBuffer (/Users/guilherme/workspace/personal/valorant-plays/server/node_modules/@prisma/cli/build/index.js:2:2979140)
at LineStream._transform (/Users/guilherme/workspace/personal/valorant-plays/server/node_modules/@prisma/cli/build/index.js:2:2978959) {
code: -32000,
data: null
} Using |
So do i |
Hey everyone, I've tried to reproduce this unsuccessfully, so I'm guessing something about my setup is different from yours. It also looks like this is happening on all platforms so can't be a macOS specific thing. I'd really appreciate it if you could do some investigation for me:
If there's anything else about your setup that you think might be relevant, please let me know too. Thanks so much! |
I solved this problem. @GuilhermedeAndrade @madebysid |
@e2goon Yep, that should fix the problem, but this is not a long-term solution. Studio generates its own Prisma Client (regardless of whether or not your project uses it), and what you're doing is manually copying over your project's generated Client to Studio's generated Client. While this will work right now, this isn't a long term solution, because things will start breaking if you change your schema, or regenerate Client, or update @prisma/cli Were you able to try out the things I mentioned in my previous comment? It'll help me debug this so I can figure out why this isn't happening automatically! |
@madebysid I tried it the way you told me, but it failed. All fail... 😢
|
Same here on macOS – prisma-cli 2.0.0-beta.4 Is there any previous version that would work without issues? |
@madebysid After changing them to if (!fs.existsSync(proxyIndexJsPath)) {
+ await copyFile(path.join(__dirname, '../../index.js'), proxyIndexJsPath)
- await copyFile(path.join(__dirname, '../index.js'), proxyIndexJsPath)
}
if (!fs.existsSync(proxyIndexDTSPath)) {
- await copyFile(path.join(__dirname, '../../index.d.ts'), proxyIndexDTSPath)
+ await copyFile(path.join(__dirname, '../index.d.ts'), proxyIndexDTSPath)
} At least I managed to start the UI. After that I saw this error: I changed that line too function getDotPrismaDir(outputDir: string): string {
if (
process.env.INIT_CWD &&
process.env.npm_lifecycle_event === 'postinstall' &&
!process.env.PWD?.includes('.pnpm')
) {
return path.join(process.env.INIT_CWD, 'node_modules/.prisma/client')
}
- return path.join(outputDir, '../../.prisma/client')
+ return path.join(outputDir, '../.prisma/client')
} But I still see errors which couldn't find |
@cihadturhan Thanks to your investigation (❤️ for that!), I realized I what was actually happening. So I deleted Studio's cache at That being said, I'm unable to reproduce this with beta.5 (released today), so perhaps give that a shot too? Regardless, I'm going to investigate and talk to the Prisma Client team to understand how |
Thanks a lot for helping guys @cihadturhan @madebysid 🙌 |
Studio working perfectly on beta 5 🎉 |
Just tested and it is indeed working fine on |
Ooh awesome, I'm going to keep this open till the next |
Nexus's Prisma Plugin has now updated to 2.0.0, which means this should now be fixed for everyone, closing! |
The package @prisma/cli has been renamed to prisma. │ |
When starting the studio with
prisma studio --experimental
, it can't find@prisma/cli/index.js
:Using
2.0.0-beta.4
Edit: Tried
2.0.0-alpha.1199
, but gives:Error: listen EADDRINUSE: address already in use :::5555
The text was updated successfully, but these errors were encountered: