studio
studio copied to clipboard
Studio can't be launched from packaged client CLI
Bug description
Studio can't be opened from a custom client (in this case, using the Go client).
> go run github.com/steebchen/prisma-client-go studio
Prisma schema loaded from schema.prisma
Prisma Studio is up on http://localhost:5555
Unable to get DMMF from Prisma Client: AggregateError:
GeneratorError: Generator "/snapshot/node_modules/prisma/prisma-client/generator-build/index.js" failed:
node:internal/modules/cjs/loader:949
throw err;
^
Error: Cannot find module '/Users/steebchen/projects/prisma/prisma-go-demo/--max-old-space-size=8096'
at Module._resolveFilename (node:internal/modules/cjs/loader:946:15)
at Function._resolveFilename (pkg/prelude/bootstrap.js:1951:46)
at Module._load (node:internal/modules/cjs/loader:787:27)
at Function.runMain (pkg/prelude/bootstrap.js:1979:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v18.5.0
at ChildProcess.<anonymous> (/snapshot/node_modules/prisma/build/index.js:40665:30)
at ChildProcess.emit (node:events:537:28)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)
at next (/snapshot/node_modules/prisma/build/index.js:16948:25)
at /snapshot/node_modules/prisma/build/index.js:16969:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
^Csignal: interrupt
It seems that it happens with both
provider = "go run github.com/steebchen/prisma-client-go"
and
provider = "prisma-client-js"
How to reproduce
mkdir demo && cd demo
go mod init demo
go get github.com/steebchen/prisma-client-go
go run github.com/steebchen/prisma-client-go studio
Expected behavior
Studio should work.
Prisma information
> go run github.com/steebchen/prisma-client-go version
prisma : 5.5.2
@prisma/client : Not found
Current platform : darwin-arm64
Query Engine (Binary) : query-engine aebc046ce8b88ebbcb45efe31cbe7d06fd6abc0a (at ../../../Library/Caches/prisma/binaries/cli/5.5.2/aebc046ce8b88ebbcb45efe31cbe7d06fd6abc0a/prisma-query-engine-darwin-arm64, resolved by PRISMA_QUERY_ENGINE_BINARY)
Schema Engine : schema-engine-cli aebc046ce8b88ebbcb45efe31cbe7d06fd6abc0a (at ../../../Library/Caches/prisma/binaries/cli/5.5.2/aebc046ce8b88ebbcb45efe31cbe7d06fd6abc0a/prisma-schema-engine-darwin-arm64, resolved by PRISMA_SCHEMA_ENGINE_BINARY)
Schema Wasm : @prisma/prisma-schema-wasm 5.5.1-1.aebc046ce8b88ebbcb45efe31cbe7d06fd6abc0a
Default Engines Hash : aebc046ce8b88ebbcb45efe31cbe7d06fd6abc0a
Studio : 0.494.0
Environment & setup
- OS:
- Browser:
- Database:
Prisma logs
No response
Error: Cannot find module '/Users/steebchen/projects/prisma/prisma-go-demo/--max-old-space-size=8096'
Isn't that a problem we had somewhere else as well, that our logic somehow ends up with this wrong command it is trying to execute?
Ah yeah, what you mean is https://github.com/steebchen/prisma-client-go/issues/455 and https://github.com/prisma/prisma/issues/10564
So probably some internal command execution (of the JS client) is what is not working. In this case it's not the exact same thing though, as it doesn't work even if you put prisma-client-js
as the provider. So it's probably something specific to studio I'd say.