1

I am trying to compile a Vue.js app. However when I run the command npm run prod I run into the following issue:

sh: /Users/antoinevandenheste/Downloads/magicfactory-1/node_modules/.bin/webpack: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] prod: `webpack --config src/.webpack/prod.js`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the [email protected] prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/antoinevandenheste/.npm/_logs/2019-06-06T06_47_42_334Z-debug.log

I have no idea what the issue is but I can't seem to get past this. Any help would be much appreciated. Bellow is the code in my Package.json. I have also tried npm install and deleting package-lock.json.

package.json

{
  "name": "vue-piaf",
  "version": "2.0.2",
  "description": "Piaf - Vue 2 Bootstrap 4 Admin Dashboard Template",
  "main": "index.js",
  "scripts": {
    "dev": "webpack-dev-server --inline --history-api-fallback --progress --config src/.webpack/dev.js",
    "prod": "webpack --config src/.webpack/prod.js"
  },
  "keywords": [
    "Vue",
    "Vue 2",
    "Webpack 4"
  ],
...
}
2
  • Are any of the answers here helpful? E.g. does the problem go away if you just reboot? Jun 6, 2019 at 7:23
  • haven't tried all yet, but most are not working Jun 6, 2019 at 7:30

1 Answer 1

2

This worked for me. Clear out all the modules and reinstall.

rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.