PanJiaChen / vue-element-admin

:tada: A magical vue admin https://panjiachen.github.io/vue-element-admin
MIT License
88.01k stars 30.48k forks source link

npm run dev报错 #3596

Open xingqiliudemao opened 3 years ago

xingqiliudemao commented 3 years ago

Bug report(问题描述)

npm run dev报错

Steps to reproduce(问题复现步骤)

npm run dev

Screenshot or Gif(截图或动态图)

image 错误日志: 0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'dev' ] 2 info using npm@6.4.1 3 info using node@v10.15.3 4 verbose run-script [ 'predev', 'dev', 'postdev' ] 5 info lifecycle vue-element-admin@3.9.3~predev: vue-element-admin@3.9.3 6 info lifecycle vue-element-admin@3.9.3~dev: vue-element-admin@3.9.3 7 verbose lifecycle vue-element-admin@3.9.3~dev: unsafe-perm in lifecycle true 8 verbose lifecycle vue-element-admin@3.9.3~dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\netapp\onepc\nopermission\node_modules.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\TortoiseSVN\bin;C:\Users\admin\AppData\Local\Microsoft\WindowsApps;C:\Users\admin\AppData\Roaming\npm;C:\Users\admin\AppData\Local\BypassRuntm;D:\文件\Microsoft VS Code\bin 9 verbose lifecycle vue-element-admin@3.9.3~dev: CWD: D:\netapp\onepc\nopermission 10 silly lifecycle vue-element-admin@3.9.3~dev: Args: [ '/d /s /c', 10 silly lifecycle 'cross-env BABEL_ENV=development webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 0.0.0.0' ] 11 silly lifecycle vue-element-admin@3.9.3~dev: Returned: code: 134 signal: null 12 info lifecycle vue-element-admin@3.9.3~dev: Failed to exec dev script 13 verbose stack Error: vue-element-admin@3.9.3 dev: cross-env BABEL_ENV=development webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 0.0.0.0 13 verbose stack Exit status 134 13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16) 13 verbose stack at EventEmitter.emit (events.js:189:13) 13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:189:13) 13 verbose stack at maybeClose (internal/child_process.js:970:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid vue-element-admin@3.9.3 15 verbose cwd D:\netapp\onepc\nopermission 16 verbose Windows_NT 10.0.18363 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev" 18 verbose node v10.15.3 19 verbose npm v6.4.1 20 error code ELIFECYCLE 21 error errno 134 22 error vue-element-admin@3.9.3 dev: cross-env BABEL_ENV=development webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 0.0.0.0 22 error Exit status 134 23 error Failed at the vue-element-admin@3.9.3 dev script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 134, true ]

Link to minimal reproduction(最小可在线还原demo)

Other relevant information(格外信息)

zxy295547387 commented 3 years ago

测试过程:我把"@vue/cli-plugin-eslint"删除就没有出现node内存溢出问题了。 解决方案:通过vue upgrade命令更新vue-cli相关的插件(包含@vue/cli-plugin-eslint)即可。 更新完后会报一些eslint代码格式错误,手动解决掉就好了(或者输入命令:npm run lint -- --fix 代码格式检查并自动修复)