Generator output `client` leads to `Error: ENOENT: no such file or directory, open '.../node_modules/@prisma/client/schema.prisma'`
See original GitHub issueBug description
If you set the value of output, the following things will happen. If you do not set, the program is normal。
please help
How to reproduce
i can set output in new version
Expected behavior
Error: ENOENT: no such file or directory, open '/Users/xxx/Program/prisma/node_modules/@prisma/client/schema.prisma'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at new LibraryEngine (/Users/xxx/Program/prisma/prisma/client/runtime/index.js:35468:41)
at PrismaClient.getEngine (/Users/xxx/Program/prisma/prisma/client/runtime/index.js:40266:16)
at new PrismaClient (/Users/xxx/Program/prisma/prisma/client/runtime/index.js:40241:29)
at Object.<anonymous> (/Users/xxx/Program/prisma/src/models.ts:2:16)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Module.m._compile (/Users/xxx/Program/prisma/node_modules/ts-node/src/index.ts:1459:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Object.require.extensions.<computed> [as .ts] (/Users/xxx/Program/prisma/node_modules/ts-node/src/index.ts:1462:12) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/Users/xxx/Program/prisma/node_modules/@prisma/client/schema.prisma',
clientVersion: '3.11.0-integration-mobc-fix.1'
}
Prisma information
generator client {
provider = "prisma-client-js"
output = "client". // If not, it is normal
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
Environment & setup
- OS:
- Mac
- Database:
- Mysql
- Node.js version:
- 16.8.0
Prisma Version
prisma : 3.11.0-integration-mobc-fix.1
@prisma/client : 3.11.0-integration-mobc-fix.1
Current platform : darwin
Query Engine (Node-API) : libquery-engine ca9fb922c8fd66aa105fe549629891efc4219ca3 (at node_modules/@prisma/engines/libquery_engine-darwin.dylib.node)
Migration Engine : migration-engine-cli ca9fb922c8fd66aa105fe549629891efc4219ca3 (at node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine : introspection-core ca9fb922c8fd66aa105fe549629891efc4219ca3 (at node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary : prisma-fmt ca9fb922c8fd66aa105fe549629891efc4219ca3 (at node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash : test-mobc-fix-ca9fb922c8fd66aa105fe549629891efc4219ca3
Studio : 0.458.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Yeoman generator error - ENOENT: no such file or directory ...
1 Answer 1 ... I'd recommend searching generators on https://npms.io/search?q=yeoman-generators and try to stay to the generator who're maintained ...
Read more >Generators (Reference) - Prisma
A generator determines which assets are created when you run the prisma generate command. The main property provider defines which Prisma Client (language ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks. We will treat this as a bug, I updated the issue title to make it easier to understand.
Yeath! Using foo instead of client,everything works as expected. @janpio