vue-admin-template
vue-admin-template copied to clipboard
运行npm run dev 出现如下错误,该怎么启动?
0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'serve' ] 2 info using [email protected] 3 info using [email protected] 4 verbose stack Error: missing script: serve 4 verbose stack at run (/usr/lib/node_modules/npm/lib/run-script.js:151:19) 4 verbose stack at /usr/lib/node_modules/npm/lib/run-script.js:61:5 4 verbose stack at /usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:356:5 4 verbose stack at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:320:45) 4 verbose stack at final (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:354:3) 4 verbose stack at then (/usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:124:5) 4 verbose stack at /usr/lib/node_modules/npm/node_modules.bundled/read-package-json/read-json.js:311:12 4 verbose stack at /usr/lib/node_modules/npm/node_modules.bundled/graceful-fs/graceful-fs.js:78:16 4 verbose stack at tryToString (fs.js:457:3) 4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:444:12) 5 verbose cwd /mnt/vue-admin-template 6 error Linux 3.10.0-957.12.2.el7.x86_64 7 error argv "/usr/bin/node" "/usr/bin/npm" "run" "serve" 8 error node v6.16.0 9 error npm v3.10.10 10 error missing script: serve 11 error If you need help, you may report this error at: 11 error https://github.com/npm/npm/issues 12 verbose exit [ 1, true ]
一样,运行不起来
npm install安装成功了?
应该是node版本问题,你切换一个大于或等于8.9的版本就好了
安装最新的就行
npm ERR! missing script: dev