Schema.prisma file from hell
I was wondering if somebody could do a quick npx prisma generate on my attached schema.prisma file. I've tried everything and I mean everything to get this to generate. Every time I get a core dump.
ubuntu@vultr:~/erp$ npx prisma db push
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "erp", schema "public" at "localhost:5432"
🚀 Your database is now in sync with your schema. Done in 1.00s
14: 0x102da6b [node]
15: 0xd5b2c9 v8::internal::Builtin_ArrayUnshift(int, unsigned long*, v8::internal::Isolate*) [node]
16: 0x15f2179 [node]
Aborted (core dumped)
✔ Generated Prisma Client (3.13.0 | library) to ./node_modules/@prisma/client in 7.33s
I've tried on Ubuntu 18.04 / 21.04 / 22.04. (all large instances with plenty of RAM-CPU) Various versions of node / prisma. I'm currently at a loss. There must be something in the file that Prisma doesn't like so I thought I would ask the experts.
Thanks in advance for any pointers on this. Cheers, Dave schema.prisma.tar.gz
I think this might be related to #10
Thanks, I'll check it out.
Adding: output = "../src/generated/typegraphql-prisma" to schema.prisma did the trick! Thanks again - great tool.
Ah crap, spoke too soon yarn dev gives the call stack error:
yarn run v1.22.18
$ ts-node-dev --no-notify --respawn --transpile-only src/index.ts
[INFO] 19:47:31 ts-node-dev ver. 1.1.8 (using ts-node ver. 9.1.1, typescript ver. 4.6.4)
RangeError: Maximum call stack size exceeded
at Object.<anonymous> (/home/osboxes/erp/src/generated/typegraphql-prisma/resolvers/inputs/OrganizationCreateOrConnectWithoutGoal_templateInput.ts:1:1)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Module._compile (/home/osboxes/erp/node_modules/source-map-support/source-map-support.js:568:25)
at Module.m._compile (/tmp/ts-node-dev-hook-7591154779968701.js:69:33)
at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at require.extensions.<computed> (/tmp/ts-node-dev-hook-7591154779968701.js:71:20)
at Object.nodeDevHook [as .ts] (/home/osboxes/erp/node_modules/ts-node-dev/lib/hook.js:63:13)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
[ERROR] 19:48:50 RangeError: Maximum call stack size exceeded
I'll keep poking around....
Have you found a solution? Does it work?
When generating to TS files rather than JS I get the RangeError: Maximum call stack size exceeded. Means I just have to use the transpiled version.