'sh: 1: ng: Permission denied' Unable to deploy on heroku

Viewed 36

I am trying to deploy my MEAN stack application on heroku but while pushing it I'm getting an error like this:

remote: -----> Build
remote:        Running heroku-postbuild
remote:        
remote:        > demoauth@1.0.0 heroku-postbuild /tmp/build_47cec536
remote:        > NPM_CONFIG_PRODUCTION=false npm install --prefix FrontEnd && npm run build --prefix FrontEnd
remote:
remote:        audited 1328 packages in 5.887s
remote:        
remote:        98 packages are looking for funding
remote:          run `npm fund` for details
remote:
remote:        found 7 vulnerabilities (2 low, 2 moderate, 3 high)
remote:          run `npm audit fix` to fix them, or `npm audit` for details
remote:        
remote:        > quiz-application@0.0.0 build /tmp/build_47cec536/FrontEnd
remote:        > ng run build
remote:
remote: sh: 1: ng: Permission denied
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 126
remote: npm ERR! quiz-application@0.0.0 build: `ng run build`
remote: npm ERR! Exit status 126
remote: npm ERR!
remote: npm ERR! Failed at the quiz-application@0.0.0 build script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR!     /tmp/npmcache.tHiQI/_logs/2022-08-17T04_52_56_174Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 126
remote: npm ERR! demoauth@1.0.0 heroku-postbuild: `NPM_CONFIG_PRODUCTION=false npm install --prefix FrontEnd && npm run build --prefix FrontEnd 
remote: npm ERR! Exit status 126
remote: npm ERR!
remote: npm ERR! Failed at the demoauth@1.0.0 heroku-postbuild script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR!     /tmp/npmcache.tHiQI/_logs/2022-08-17T04_52_56_188Z-debug.log
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: 
remote:  !     Push failed

Do you do you know how to deal with this? I tried multiple solutions from stackoverflow but none worked. ashdjhdaksjhdkahsdhaksuhiuwrerwe rcasdasdweweqwsfsdfffffffff ashdjhdaksjhdkahsdhaksuhiuwrerwe rcasdasdweweqwsfsdfffffffff

0 Answers
Related