問題描述
victorwk@localhost vue-ui % npm run build
> [email protected] build /Volumes/victor/java_about/xxx-vue
> vue-cli-service build
sh: /Volumes/victor/java_about/xxx/node_modules/.bin/vue-cli-service: /bin/sh: bad interpreter: Operation not permitted
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] build: `vue-cli-service build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] build 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/wangkang/.npm/_logs/2020-03-27T07_13_52_132Z-debug.log
執行命令解決
到項目路徑下
rm -rf node_modules
rm package-lock.json
npm cache clear --force
在執行
npm install
成功執行
npm run build