sls-admin/sls-admin-vue

执行npm run dev的时候报错

Closed this issue · 5 comments

执行npm run dev的时候报错:

dell@DESKTOP-MVU77SM MINGW64 /d/wnmp/www/sls-admin/vue2 (master)
$ npm run dev

> vue2-admin@1.0.0 dev D:\wnmp\www\sls-admin\vue2
> node build/dev-server.js


To use this template, you must update following to modules:

  node: 8.0.0-nightly20170216642eec162d should be >= 4.0.0


npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\dell\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v8.0.0-nightly20170216642eec162d
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! vue2-admin@1.0.0 dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue2-admin@1.0.0 dev script 'node build/dev-server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vue2-admin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs vue2-admin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls vue2-admin
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\wnmp\www\sls-admin\vue2\npm-debug.log


@zwl1619 您好,请问您node版本多少?看报错显示说,node版本必须大于4。

cdll commented

楼主也是挺猛,node都上8.0了

我也是报这个错,怎么办

@625831418 @zwl1619
建议使用node版本4,node6构建vue-cli时,在运行npm run dev时,浏览器控制台会报import错误,然后需要改webpack配置文件解决问题。所以不建议使用太高的版本。

@cdll 凉神光临小舍,顿时感觉蓬荜生辉啊。