Ecommerce Shopify WordPress Discussion

How to deploy Shopify app on vercel with prisma database?

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

December 30, 2023

Adding "postinstall" : "prisma generate" in package.json should be enough. You should also add a DATABASE_URL environment variable in Vercel, only for preview mode (with a different database) otherwise everytime you push to another branch with a different schema it will create problems when you try to merge.

December 30, 2023

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.