centos npm run build 报错


报错信息

npm run  build 
> XXXX@0.1.0 build /home/lvph/work/XXXX
> vue-cli-service build

sh: XXXX/node_modules/.bin/vue-cli-service: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! XXX@0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the xxxx@0.1.0 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!     /home/lvph/.npm/_logs/2020-01-19T01_33_20_803Z-debug.log

解决办法

到项目路径下
rm -rf node_modules
rm package-lock.json
npm cache clear --force
在执行
npm install

最后成功

npm run build


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM