npm run compile 的时候报错修复

Posted vper

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 thinkjs-application@1.0.0 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 thinkjs-application@1.0.0 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

以上是关于npm run compile 的时候报错修复的主要内容,如果未能解决你的问题,请参考以下文章

npm run watch 运行失败,但没有报错

在打包(npm run build)的时候不执行了,但是也不报错,输入npm run dev可以启动

当使用npm run build的时候报错:TypeError: Cannot read property 'thisCompilation' of undefined

Vue报错:npm run start npm ERR! missing script: start

npm run build报错Unexpected token: name...

vuecli中npm run lint 报错