#ReferenceError: prisma is not defined :(

1 messages · Page 1 of 1 (latest)

ocean sapphire
#

Everything working fine locally, but production is failing with ReferenceError: prisma is not defined (I use prisma in the job tasks themselves)

Stack trace, in case it matters:

ReferenceError: prisma is not defined
    at cx (/var/task/.next/server/app/api/trigger/route.js:2:210384)
    at cF (/var/task/.next/server/app/api/trigger/route.js:6:5445)
    at t.runTask.name (/var/task/.next/server/app/api/trigger/route.js:6:62545)
    at executeTask (/var/task/.next/server/app/api/trigger/route.js:2:159977)
    at AsyncLocalStorage.run (node:async_hooks:338:14)
    at oB.runTask (/var/task/.next/server/app/api/trigger/route.js:2:161788)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.run (/var/task/.next/server/app/api/trigger/route.js:6:62474)
    at async #executeJob (/var/task/.next/server/app/api/trigger/route.js:2:195875)
    at async cu.handleRequest (/var/task/.next/server/app/api/trigger/route.js:2:185917)
raven brook
#

This is strange as with v2 your code is running wherever you normally deploy. Are you using Prisma in your Next.js app, other than in your Trigger jobs?

naive totem
#

^ This reads to me like you might have prisma as a dev-dependency so it works locally but doesn't play nice when deployed in production

raven brook