Next.js Discord

Discord Forum

need help using @shopify/shopify-api with next.js in vercel

Unanswered
Silky ant posted this in #help-forum
Open in Discord
Silky antOP
i'm a bit of a rookie and trying to get my package.json right, but vercel build keep bombing with error: Cannot find module '/var/task/node_modules/@shopify/shopify-api/dist/cjs/adapters/node/index.js'
Did you forget to add it to "dependencies" in package.json?
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
package.json here:

{
"name": "vipps-login-server",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"react": "^18",
"react-dom": "^18",
"next": "14.2.3",
"axios": "^0.21.1",
"qs": "^6.10.3",
"express": "^4.17.1",
"cookie-parser": "^1.4.6",
"@shopify/shopify-api": "^11.0.0"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"eslint": "^8",
"eslint-config-next": "14.2.3"
}
}

0 Replies