'Shopify CLI - Shopify node serve is not working for 1 year old project
I am trying to refactor my old shopify project but, when I run command, "shopify node serve" It gives me the following error.
"This command can only be run within node projects."
But, It is a node project. It is a next.js shopify application.
Below is my package.json file.
{
"name": "Announcement_Bar",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "forever start --minUptime 1000 server.js",
"build": "next build",
"start": "NODE_ENV=production forever start --minUptime 1000 server.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.34",
"@fortawesome/free-brands-svg-icons": "^5.15.2",
"@fortawesome/free-regular-svg-icons": "^5.15.2",
"@fortawesome/free-solid-svg-icons": "^5.15.2",
"@fortawesome/react-fontawesome": "^0.1.14",
"@koa/cors": "^3.1.0",
"@material-ui/core": "^4.11.3",
"@material-ui/icons": "^4.11.2",
"@maxmind/geoip2-node": "^1.6.0",
"@shopify/app-bridge": "^1.28.0",
"@shopify/app-bridge-react": "^1.28.0",
"@shopify/app-bridge-utils": "^1.28.0",
"@shopify/koa-shopify-auth": "^3.2.0",
"@shopify/koa-shopify-graphql-proxy": "^3.3.1",
"@shopify/koa-shopify-webhooks": "^2.6.0",
"@shopify/polaris": "^4.27.0",
"@zeit/next-css": "^1.0.1",
"@zeit/next-sass": "^1.0.1",
"ag-grid-community": "^22.1.1",
"ag-grid-react": "^22.1.1",
"agile_crm": "^1.2.5",
"animate.css": "^3.7.2",
"animate.css-react": "1.0.0",
"apollo-boost": "^0.4.9",
"bitly": "^7.1.2",
"currency-formatter": "^1.5.6",
"dotenv": "^8.2.0",
"draft-js": "^0.11.7",
"draftjs-to-html": "^0.9.1",
"emoji-picker-react": "^3.4.2",
"es6-promise": "^4.2.8",
"fbjs": "^3.0.0",
"graphql": "^14.7.0",
"he": "^1.2.0",
"html-to-draftjs": "^1.5.0",
"install": "^0.13.0",
"isomorphic-fetch": "^2.2.1",
"javascript-obfuscator": "^0.24.6",
"js-cookie": "^2.2.1",
"jsonwebtoken": "^8.5.1",
"koa": "^2.13.1",
"koa-body": "^4.2.0",
"koa-bodyparser": "^4.3.0",
"koa-cache-control": "^2.0.0",
"koa-conditional-get": "^2.0.0",
"koa-etag": "^3.0.0",
"koa-mongo": "^1.9.3",
"koa-router": "^7.4.0",
"koa-session": "^5.13.1",
"koa-shopify-auth-cookieless": "^1.0.31",
"koa-shopify-graphql-proxy-cookieless": "^1.0.11",
"koa-static": "^5.0.0",
"koa-static-cache": "^5.1.4",
"koa2-formidable": "^1.0.2",
"lodash": "^4.17.20",
"mailchimp-api-v3": "^1.14.0",
"mmmagic": "^0.5.3",
"moment": "^2.29.1",
"mongodb": "^3.6.4",
"ms": "^2.1.3",
"next": "^9.5.5",
"node-cron": "^2.0.3",
"node-sass": "^4.14.1",
"nodemailer": "^6.4.17",
"notistack": "^0.9.17",
"npm": "^7.5.2",
"parse-link-header": "^1.0.1",
"react": "^16.14.0",
"react-apollo": "^3.1.5",
"react-color": "^2.19.3",
"react-copy-to-clipboard": "^5.0.3",
"react-datepicker": "^2.16.0",
"react-dom": "^16.14.0",
"react-draft-wysiwyg": "^1.14.5",
"react-hotjar": "^2.2.1",
"react-loading-overlay": "^1.0.1",
"react-measure": "^2.5.2",
"react-player": "^1.15.3",
"react-select": "^3.2.0",
"react-select-country-list": "^2.2.3",
"react-slick": "^0.27.14",
"react-world-flags": "^1.4.0",
"shopify-jwt-auth-verify": "^1.0.10",
"store-js": "^2.0.4"
},
"devDependencies": {}
}
My node version is: 14.6.0 Shopify version: 2.6.5
I am not sure what is the problem, Only shopify node commands related to starting the server, are not working. All other shopify commands are working.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|