Heroku: react-scripts: Permission denied while deploying on Heroku

Viewed 19

I am getting this error while deploying mern application on heroku by heroku cli. How to resolve react-scripts: Permission denied ? I tried npm install react-scripts --save but still give me npm errors.

remote: -----> Build
remote:        Running heroku-postbuild
remote:        
remote:        > backend@1.0.0 heroku-postbuild
remote:        > cd client && npm install --legacy-peer-deps && npm run build
remote:
remote:        
remote:        removed 9 packages, and audited 1465 packages in 3s
remote:
remote:        217 packages are looking for funding
remote:          run `npm fund` for details
remote:
remote:        6 high severity vulnerabilities
remote:
remote:        To address all issues (including breaking changes), run:
remote:          npm audit fix --force
remote:
remote:        Run `npm audit` for details.
remote:        
remote:        > react-login@1.0.0 build
remote:        > react-scripts build
remote:
remote: /tmp/build-a0701c25.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:        Some possible problems:
remote:
remote:        - node_modules checked into source control
remote:          https://devcenter.heroku.com/articles/node-best-practices#only-git-the-important-bits
remote:
remote:        Love,
remote:        Heroku
remote:
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: !       Push rejected to react-login-system.
remote:
To https://git.heroku.com/react-login-system.git
 ! [remote rejected]     master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/react-login-system.git'
0 Answers
Related