Error:500 "INTERNAL_SERVER_ERROR - This Serverless Function has crashed" during deployment to Vercel

NVT_DEV
Shopify Partner
3 0 0

Have a nice day. Please help me.

NOTE

  1. I have changed the Adapter to: import "@shopify/shopify-app-remix/adapters/vercel";
  2. Changed the database from SQLite to PostgreSQL.
  3. Environment variables on Vercel:
  • SHOPIFY_API_KEY
  • SHOPIFY_WISHLIST_ICON_ID
  • SHOPIFY_API_SECRET
  • POSTGRES_URL
  • POSTGRES_PRISMA_URL
  • POSTGRES_URL_NO_SSL
  • POSTGRES_URL_NON_POOLING
  • POSTGRES_USER
  • POSTGRES_HOST
  • POSTGRES_PASSWORD
  • POSTGRES_DATABASE

Debug logs

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/node_modules/@shopify/polaris/locales/en.json' imported from /var/task/node_modules/@shopify/shopify-app-remix/dist/esm/react/components/AppProvider/AppProvider.mjs
at new NodeError (node:internal/errors:405:5)
at finalizeResolution (node:internal/modules/esm/resolve:332:11)
at moduleResolve (node:internal/modules/esm/resolve:1029:10)
at moduleResolveWithNodePath (node:internal/modules/esm/resolve:876:12)
at defaultResolve (node:internal/modules/esm/resolve:1242:79)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:404:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:373:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:250:38)
at ModuleWrap. (node:internal/modules/esm/module_job:76:39)
at link (node:internal/modules/esm/module_job:75:36) {
url: 'file:///var/task/node_modules/@shopify/polaris/locales/en.json',
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
INIT_REPORT Init Duration: 386.22 ms Phase: init Status: error Error Type: Runtime.ExitError
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/node_modules/@shopify/polaris/locales/en.json' imported from /var/task/node_modules/@shopify/shopify-app-remix/dist/esm/react/components/AppProvider/AppProvider.mjs
at new NodeError (node:internal/errors:405:5)
at finalizeResolution (node:internal/modules/esm/resolve:332:11)
at moduleResolve (node:internal/modules/esm/resolve:1029:10)
at moduleResolveWithNodePath (node:internal/modules/esm/resolve:876:12)
at defaultResolve (node:internal/modules/esm/resolve:1242:79)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:404:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:373:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:250:38)
at ModuleWrap. (node:internal/modules/esm/module_job:76:39)
at link (node:internal/modules/esm/module_job:75:36) {
url: 'file:///var/task/node_modules/@shopify/polaris/locales/en.json',
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
INIT_REPORT Init Duration: 476.74 ms Phase: invoke Status: error Error Type: Runtime.ExitError
Unknown application error occurred

Replies 0 (0)