vue-element-admin 第一次安装然后npm run dev 就报错了

pzfprimi  于 5个月前  发布在  其他
关注(0)|答案(4)|浏览(67)

`> vue-element-admin@4.4.0 dev /mnt/d/h5/vue-element-admin
vue-cli-service serve

INFO Starting development server...
98% after emitting CopyPlugin

DONE Compiled successfully in 18824ms 3:47:42 PM

App running at:

Note that the development build is not optimized.
To create a production build, run npm run build.

events.js:287
throw er; // Unhandled 'error' event
^

Error: spawn cmd.exe ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd.exe',
path: 'cmd.exe',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:9527/' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-element-admin@4.4.0 dev: vue-cli-service serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-element-admin@4.4.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! /root/.npm/_logs/2020-06-24T07_47_42_933Z-debug.log`

Bug report(问题描述)

Steps to reproduce(问题复现步骤)
Screenshot or Gif(截图或动态图)

Other relevant information(格外信息)
  • Your OS: ubuntu
  • Node.js version: v12.16.2
  • vue-element-admin version:
3duebb1j

3duebb1j1#

@wsas845 问题解决了吗

n6lpvg4x

n6lpvg4x3#

package里边一个chokidar要改成"^2.1.5",默认那个不支持node版本>8以上的。删除node__modules再npm重装。

kx5bkwkv

kx5bkwkv4#

解决了吗?
我的报错和你一样,我在系统环境变量的path中添加C:\windows\system32 ,可以试试,

相关问题