P
Prisma•2mo ago
chris-is-agile

Build nightmare BigInts and external prisma/zenclient project not building with TurboRepo and nuxt

I have a nuxt app in a turbo repo monorepo and have followed the instructions to setup a separate /db project in packages. I can get prisma and zenclient to work when I include them as part of the nuxt projecvt, but when I separate them i get the following error when it ry to build: @rhythmic/platform:build: ERROR Transform failed with 3 errors: @rhythmic/platform:build: C:\Projects\rhythmic\packages\db\generated\prisma\runtime\library.js:111:10142: ERROR: Big integer literals are not available in the configured target environment ("es2019") I'm on the current version of all projects and have tried everything i know to solve this.
5 Replies
Prisma AI Help
Prisma AI Help•2mo ago
You selected to wait for the human sages. They'll share their wisdom soon. Grab some tea while you wait, or check out #ask-ai if you'd like a quick chat with the bot anyway!
chris-is-agile
chris-is-agileOP•2mo ago
Some additoinal info: tsconfig from my /db project: { "compilerOptions": { "skipLibCheck": true, "strict": true, "declaration": true, "esModuleInterop": true, "target": "ESNext", "module": "ESNext", "lib": ["ESNext", "DOM"], "moduleResolution": "Node", "baseUrl": ".", "rootDir": "./src", "outDir": "./dist" }, "exclude": [ "node_modules" // Exclude node_modules ], "include": ["src/*/"] } Nuxt 3.15 with no changes to tsconfig. I'm using zenstack to generate. It runs when i use pnpm run dev but when i use turbo build it errors out when its building witht he error I shared. package.json { "name": "@rhythmic/db", "version": "1.0.0", "description": "Rhythmic DB. Build to the Beat.", "author": "Chris Sims", "main": "src/index.ts", "scripts": { "db:generate": "zenstack generate --output=./generated/zenstackhq", "db:push": "prisma db push" }, "zenstack": { "schema": "./src/schema.zmodel", "output": "generated/zenstackhq" }, "prisma": { "seed": "npx tsx src/prisma/seed.ts", "schema": "./src/prisma/schema.prisma" }, "devDependencies": { "prisma": "^6.2.1", "ts-node": "^10.9.2", "tsx": "^4.19.2", "zenstack": "2.11.4" }, "dependencies": { "@prisma/client": "^6.2.1", "@zenstackhq/runtime": "2.11.4", "zod": "^3.24.1" }, "imports": { "#prisma": "./generated/prisma/index.js" }, "exports": { ".": "./src/index.mts", "./prisma": { "types": "./generated/prisma/index.d.ts", "default": "./generated/prisma/index.js" }, "./enhance": { "types": "./generated/zenstackhq/enhance.d.ts", "default": "./generated/zenstackhq/enhance.js" }, "./zenstackhq": { "types": "./generated/zenstackhq/.logical-prisma-client/index.d.ts", "default": "./generated/zenstackhq/.logical-prisma-client/index.js" }, "./zenstack/": { "types": "./generated/zenstackhq/.d.ts", "default": "./generated/zenstackhq/.js" }, "./generated/zenstackhq/": { "types": "./generated/zenstackhq/.d.ts", "default": "./generated/zenstackhq/.js" }, "./generated/prisma/": { "types": "./generated/prisma/.d.ts", "default": "./generated/prisma/*.js" } } } --bump--
Nurul
Nurul•4w ago
Can you try setting the build target like this and check if you still get the same error?
// nuxt.config.ts
export default defineNuxtConfig({
// ...
vite: {
build: {
target: 'es2020',
},
},
})
// nuxt.config.ts
export default defineNuxtConfig({
// ...
vite: {
build: {
target: 'es2020',
},
},
})
chris-is-agile
chris-is-agileOP•2w ago
unfortunately when I did that it caused another issue with bnigints 🙂 thankfully, I moved away from creating a custom package for it and when I used the default package name it worked (unlike what the prisma documentation said to do :))
Nurul
Nurul•7d ago
Can you share your solution or configs? This maybe helpful to others who may face this issue

Did you find this page helpful?