欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

vue项目运行npm run dev时报错

程序员文章站 2022-05-13 19:39:38
...

报错内容如下:

0 info it worked if it ends with ok
1 verbose cli [ 'D:\\tools\\nodejs\\node.exe',
1 verbose cli   'D:\\tools\\nodejs\\node_global\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using [email protected]6.13.1
3 info using [email protected].13.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle vue-admin-[email protected]3.9.0~predev: vue-admin-[email protected]3.9.0
6 info lifecycle vue-admin-[email protected]3.9.0~dev: vue-admin-[email protected]3.9.0
7 verbose lifecycle vue-admin-[email protected]3.9.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle vue-admin-[email protected]3.9.0~dev: PATH: D:\tools\nodejs\node_global\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\workspaces\git\information-cloud\code\web-front\zzxs-management\node_modules\.bin;D:\tools\Golang\bin;D:\tools\development\Xftp\;D:\tools\development\Xshell6\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;D:\tools\development\TortoiseSVN\bin;D:\tools\nodejs\;C:\WINDOWS\System32\OpenSSH\;D:\tools\Golang\bin;D:\tools\development\TortoiseGit\bin;C:\Users\wx\AppData\Local\Microsoft\WindowsApps;C:\Users\wx\AppData\Local\atom\bin;D:\tools\development\MySQL\mysql-5.7.24-winx64\bin;D:\tools\Java\maven\apache-maven-3.5.4\bin;D:\tools\Java\jdk\jdk1.8.1_81\bin;C:\Users\wx\AppData\Roaming\npm;D:\tools\nodejs\node_global;C:\Users\wx\AppData\Local\Microsoft\WindowsApps;D:\tools\development\Tomcat\apache-tomcat-8.5.37\bin;D:\tools\development\git for windows\Git\cmd;D:\tools\development\redis-3.2.100\redis;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;D:\tools\development\MongoDB\bin;C:\Users\wx\go\bin;D:\tools\Golang\bin;D:\tools\Erlang\erl10.0.1\bin;;D:\mygo\bin
9 verbose lifecycle vue-admin-[email protected]3.9.0~dev: CWD: D:\workspaces\git\information-cloud\code\web-front\zzxs-management
10 silly lifecycle vue-admin-[email protected]3.9.0~dev: Args: [ '/d /s /c',
10 silly lifecycle   'webpack-dev-server --inline --progress --config build/webpack.dev.conf.js' ]
11 silly lifecycle vue-admin-[email protected]3.9.0~dev: Returned: code: 134  signal: null
12 info lifecycle vue-admin-[email protected]3.9.0~dev: Failed to exec dev script
13 verbose stack Error: vue-admin-[email protected]3.9.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
13 verbose stack Exit status 134
13 verbose stack     at EventEmitter.<anonymous> (D:\tools\nodejs\node_global\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (D:\tools\nodejs\node_global\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid vue-admin-[email protected]3.9.0
15 verbose cwd D:\workspaces\git\information-cloud\code\web-front\zzxs-management
16 verbose Windows_NT 10.0.17763
17 verbose argv "D:\\tools\\nodejs\\node.exe" "D:\\tools\\nodejs\\node_global\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v10.13.0
19 verbose npm  v6.13.1
20 error code ELIFECYCLE
21 error errno 134
22 error vue-admin-[email protected]3.9.0 dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
22 error Exit status 134
23 error Failed at the vue-admin-[email protected]3.9.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 134, true ]

错误原因:升级过npm到最新版本,项目没有重新install。
解决方法:
1、删除项目下的node_modules模块;
2、重新运行:npm install;
3、运行项目:npm run dev;

相关标签: vue npm node.js