Prisma breaks when on production server (dedicated server, backend app)

const fetched = await this.prisma.xpMultiplier.findFirst({
      where: {
        type,
        selectorId
      },
    });


This compiles and runs just fine on my local machine, no errors whatsoever.

So I push my schema, merge my deploy request on planet scale, pull the code, and start the app then I get this error:

discord:start: cache miss, executing f4b4a032f7fb9c18
discord:start: 
discord:start: > discord@0.0.1 start /home/ubuntu/app/apps/discord
discord:start: > node dist/index.js
discord:start: 
discord:start: ~discord-client ] Ready!
discord:start: Getting account for user 9ce86584-2888-4f5a-96e1-84a7c107762d
discord:start: node:events:491
discord:start:       throw er; // Unhandled 'error' event
discord:start:       ^
discord:start:
discord:start: TypeError: Cannot read properties of undefined (reading 'findFirst')
discord:start:     at XPModifierManager.<anonymous> (/home/ubuntu/app/packages/database/dist/XPModifierManager.js:26:60)
discord:start:     at Generator.next (<anonymous>)
discord:start:     at /home/ubuntu/app/packages/database/dist/XPModifierManager.js:8:71
discord:start:     at new Promise (<anonymous>)
discord:start:     at __awaiter (/home/ubuntu/app/packages/database/dist/XPModifierManager.js:4:12)
discord:start:     at XPModifierManager.get (/home/ubuntu/app/packages/database/dist/XPModifierManager.js:24:42)
discord:start:     at Object.get (/home/ubuntu/app/packages/database/dist/XPModifierManager.js:79:37)
discord:start:     at /home/ubuntu/app/apps/discord/dist/index.js:83:68
discord:start:     at Generator.next (<anonymous>)
discord:start:     at fulfilled (/home/ubuntu/app/apps/discord/dist/index.js:5:58)
discord:start: Emitted 'error' event on DiscordClient instance at:
discord:start:     at emitUnhandledRejectionOrErr (node:events:394:10)
discord:start:     at process.processTicksAndRejections (node:internal/process/task_queues:84:21)
discord:start:
discord:start: Node.js v18.15.0
discord:start:  ELIFECYCLE  Command failed with exit code 1.      
discord:start: ERROR: command finished with error: command (/home/ubuntu/app/apps/discord) pnpm run start exited (1)
Was this page helpful?