繁体   English   中英

在heroku上部署节点项目时出错

[英]Error while deploying node project on heroku

我成功部署了该项目,然后在package.json和其他文件中进行了一些更改。

现在它给出了错误。

package.json文件中


    "test": "echo \"Error: no test specified\" && exit 1",

    "start": "node server.js",

    "heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"

  },

得到以下错误

remote: -----> Build
remote:        Running heroku-postbuild
remote:        
remote:        > hotel-booking-guide@1.0.0 heroku-postbuild
remote:        > NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
remote:
remote:        
remote:        up to date, audited 1973 packages in 4s
remote:
remote:        162 packages are looking for funding
remote:          run `npm fund` for details
remote:
remote:        27 vulnerabilities (16 moderate, 9 high, 2 critical)
remote:
remote:        To address all issues (including breaking changes), run:
remote:          npm audit fix --force
remote:
remote:        Run `npm audit` for details.
remote:        
remote:        > hotel_booking@0.1.0 build
remote:        > react-scripts build
remote:
remote:   sh: 1: react-scripts: Permission denied
remote: 
remote: -----> Build failed
remote:        
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote:        If you're stuck, please submit a ticket so we can help:
remote:        https://help.heroku.com/
remote:
remote:        Love,
remote:        Heroku
remote:
remote:  !     Push rejected, failed to compile Node.js app.
remote: 

似乎“npm run build”给出了错误。

您可以尝试使用git push -f heroku master强制推送您的更改。 您可以在此处阅读更多内容。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM