I have built the app using shopify app remix. I have deployed my app on the vercel, after deployment in the vercel log I got errors. I have committed my DB on Git Hub directly as well but still got this error. Does any one know how to Shopify app deploy on the vercel?
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:21: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:1250:17)"," at process.emit (node:events:526:35)"," at process.emit (/var/task/node_modules/source-map-support/source-map-support.js:516:21)"," at emit (node:internal/process/promises:149:20)"," at processPromiseRejections (node:internal/process/promises:283:27)"," at processTicksAndRejections (node:internal/process/task_queues:96:32)"]}
I have found the following solution but it's not working for me.
https://github.com/Shopify/shopify-app-template-remix#database-tables-dont-exist https://www.prisma.io/docs/guides/deployment/serverless/deploy-to-vercel
Vercel does not support SQLite. I was able to successfully deploy a Shopify Remix App on Vercel using Postgres.
I updated schema.prisma
datasource db {
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
}
I also needed to modify the create_session_table
migration to update the type DATETIME
to TIMESTAMP