prisma generate is unable to generate typegraphql
See original GitHub issueBug description
I am running a docker container with node:14-alpine
on my Mac. The npx prisma generate
command used to work fine before.
After I witched from 2.25.0
to 3.2.1
the generate command stopped working, although this may not be the issue.
I get this now :
Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Error: ✔ Generated Prisma Client (3.2.1) to ./node_modules/@prisma/client in 718ms
Error: EIO: i/o error, open '/app/node_modules/@generated/type-graphql/resolvers/crud/model/FindFirstModelResolver.js
During this time, I added more models to the schema and my schema is around 700 lines.
The error changes each time I run the generate command. I suspect the large number of files created during the generation to be the issue. I can see the files in the @generated folder, but most of those are blank.
When I run the same container on an ubuntu machine, I get the too many files error.
How to reproduce
- run
npx prisma generate
- the typegraphql generation gives an error
Expected behavior
No response
Prisma information
schema is around 700 lines.
Environment & setup
- OS: Mac OS
- Database: PostgreSQL
- Node.js version: docker node:14-alpine
Prisma Version
prisma : 3.2.1
@prisma/client : 3.2.1
Current platform : linux-musl
Query Engine (Node-API) : libquery-engine b71d8cb16c4ddc7e3e9821f42fd09b0f82d7934c (at node_modules/prisma/node_modules/@prisma/engines/libquery_engine-linux-musl.so.node)
Migration Engine : migration-engine-cli b71d8cb16c4ddc7e3e9821f42fd09b0f82d7934c (at node_modules/prisma/node_modules/@prisma/engines/migration-engine-linux-musl)
Introspection Engine : introspection-core b71d8cb16c4ddc7e3e9821f42fd09b0f82d7934c (at node_modules/prisma/node_modules/@prisma/engines/introspection-engine-linux-musl)
Format Binary : prisma-fmt b71d8cb16c4ddc7e3e9821f42fd09b0f82d7934c (at node_modules/prisma/node_modules/@prisma/engines/prisma-fmt-linux-musl)
Default Engines Hash : b71d8cb16c4ddc7e3e9821f42fd09b0f82d7934c
Studio : 0.435.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Thanks @janpio, I think the issue is with typegraphql-prisma. But I will try and find out if this works with the older prisma.
I use
typegraphql-prisma
as well, although my Prisma schema is smaller than yours (~250 lines, 22 models). This sounds like some problem in your environment/OS/filesystem. I don’t have a mac, I am running it on 1 year old version of WSL2… Note, thattypegraphql-prisma
generates lot of stuff and the library from version 0.16.2 can limit the amount of generated (potentially never used) stuff. Try to consider if you can limit the generated files.