VUE报错:npm ERR! code ELIFECYCLE npm ERR! errno 126 npm ERR! cpu-approve-fe@0.1.0

230 阅读1分钟

报错信息:

npm ERR! code ELIFECYCLE npm ERR! errno 126 npm ERR! cpu-approve-fe@0.1.0 dev: vue-cli-service serve --mode dev npm ERR! Exit status 126 npm ERR! npm ERR! Failed at the cpu-approve-fe@0.1.0 dev 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/yuhang/.npm/_logs/2022-08-03T03_11_02_892Z-debug.log ✘ yuhang@wuyuhangdeMacBook-Pro  ~/Desktop/每月记事/cpu-approve-fe   release-bip-20211101 ±  npm run serve npm ERR! missing script: serve

npm ERR! A complete log of this run can be found in: npm ERR! /Users/yuhang/.npm/_logs/2022-08-03T03_11_11_644Z-debug.log

**解决方案:终端输入以下代码 **

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