I'm trying to connect my GitHub account and deploy it on Heroku using GitHub Connect.
I'm getting this error which I'm not able to solve.
sh: 1: react-scripts: Permission denied
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
If you're stuck, please submit a ticket so we can help:
https://help.heroku.com/
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
Here is my GitHub repository link - https://github.com/aquib12377/thehealthykrunch
CodePudding user response:
In your package.json file. You should have a build command. Heroku uses that to build your project.
So in build stage heroku first installs all your node modules and later on it runs npm run build
. Then finally for deploying npm start
command is run
CodePudding user response:
Run command on terminal to check logs and add npm version in your pacage.json
heroku logs --app your_app_name