[英]Something wrong with my heroku deployment
`NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client`
remote: npm ERR! Exit status 254
remote: npm ERR!
remote: npm ERR! Failed at the walking-bucket@1.0.0 heroku-postbuild script.
這是我嘗試將Express / React應用程序部署到heroku時遇到的錯誤,有什么想法嗎?
編輯:package.json與構建腳本:
{ "name": "walking-bucket", "version": "1.0.0", "description": "basketball shot journal log", "main": "server.js", "scripts": { "client-install": "npm install --prefix client", "start": "node server.js", "server": "nodemon server.js", "client": "npm start --prefix client", "dev": "concurrently \\"npm run server\\" \\"npm run client\\"", "heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client" }, "author": "", "license": "ISC", "dependencies": { "bcrypt": "^3.0.2", "bcrypt-nodejs": "0.0.3", "body-parser": "^1.18.3", "concurrently": "^4.1.0", "express": "^4.16.4", "express-session": "^1.15.6", "mongoose": "^5.3.14", "passport": "^0.4.0", "passport-local": "^1.0.0", "passport-local-mongoose": "^5.0.1" }, "devDependencies": { "nodemon": "^1.18.7" } }
用build命令得到我的解決方案
"build": "react-scripts build"
來自create-react-app package.json
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.