npm run compile 的时候报错修复

error Linux 3.10.0-327.el7.x86_64
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "compile"
19 error node v4.2.4
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error [email protected] compile: `babel --presets es2015-loose,stage-1 --plugins transform-runtime src/ --out-dir app/ --source-maps`
22 error Exit status 126
23 error Failed at the [email protected] compile script 'babel --presets es2015-loose,stage-1 --plugins transform-runtime src/ --out-dir app/ --source-maps'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the thinkjs-application package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error babel --presets es2015-loose,stage-1 --plugins transform-runtime src/ --out-dir app/ --source-maps
23 error You can get information on how to open an issue for this project with:
23 error npm bugs thinkjs-application
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls thinkjs-application
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

解决方法:

1、rm -rf node_modules
2、rm package-lock.json
3、npm cache clear --force 4、npm install

猜你喜欢

转载自www.cnblogs.com/vper/p/12896631.html