Questions and discussions about using the Shopify CLI and Shopify-built libraries.
Hi,
I have created a Shopify app using Shopify-remix-template and was trying to deploy it onto Vercel.
The app failed to run with the following errors
Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: Prisma session table does not exist. This could happen for a few reasons, see https://github.com/Shopify/shopify-app-js/tree/main/packages/shopify-app-session-storage-prisma#troubleshooting for more information","reason":{"errorType":"Error","errorMessage":"Prisma session table does not exist. This could happen for a few reasons, see https://github.com/Shopify/shopify-app-js/tree/main/packages/shopify-app-session-storage-prisma#troubleshooting for more information","stack":["Error: Prisma session table does not exist. This could happen for a few reasons, see https://github.com/Shopify/shopify-app-js/tree/main/packages/shopify-app-session-storage-prisma#troubleshooting for more information"," at /var/task/node_modules/@shopify/shopify-app-session-storage-prisma/build/cjs/prisma.js:23:13"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: Prisma session table does not exist. This could happen for a few reasons, see https://github.com/Shopify/shopify-app-js/tree/main/packages/shopify-app-session-storage-prisma#troubleshooting for more information"," at process.<anonymous> (file:///var/runtime/index.mjs:1276:17)"," at process.emit (node:events:530:35)"," at emit (node:internal/process/promises:150:20)"," at processPromiseRejections (node:internal/process/promises:284:27)"," at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"]} Unknown application error occurred
I found few suggestions on fixing this issue below but not working
https://www.prisma.io/docs/orm/more/help-and-troubleshooting/help-articles/vercel-caching-issue
https://github.com/Shopify/shopify-app-template-remix#database-tables-dont-exist
I have also tried to run npm setup or prisma generate before and after build script also tried to run it before start script, which are all not working.
Please help, thank you
Am seeing this error also.
I've referenced the above articles, migrated and pushed my db, switched db providers, added prisma generation to my build command, etc.
Any luck with this one? I'm facing the same problem...
1. Make sure you set "postinstall": "prisma generate" in the package.json file.
2. If you are using Vercel Postgres and you get Timed out fetching a new connection from the connection pool message, make sure you read this section of the vercel docs. I had to update the POSTGRES_PRISMA_URL env var through the CLI to increase the connection_limit arg
@andyjpg It's most likely you haven't migrated your db yet.
Make sure you set your schema.prisma correctly and pull the correct env from Vercel using vercel env pull
// your schema.prisma should start as
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
}
Delete any files inside migrations folder, then run:
npx prisma migrate dev --name app-setup
CC: @joshcorbett @pedromsalbur
Leysam | The Shopify Guy
- Was my reply helpful? Click Like to let me know!