vue-element-admin npm run dev报错

fjnneemd  于 2022-11-13  发布在  其他
关注(0)|答案(6)|浏览(377)

➜ vue-element-admin git:(master) ✗ npm run dev
vue-element-admin@4.2.1 dev /usr/local/var/www/vue-element-admin
vue-cli-service serve

/usr/local/var/www/vue-element-admin/node_modules/open/index.js:16
const wslToWindowsPath = async path => {
^^^^
SyntaxError: Unexpected identifier
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/var/www/vue-element-admin/node_modules/@vue/cli-shared-utils/lib/openBrowser.js:9:14)
at Module._compile (module.js:570:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-element-admin@4.2.1 dev: vue-cli-service serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-element-admin@4.2.1 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! /Users/fanjiabin/.npm/_logs/2019-07-27T21_05_42_324Z-debug.log

gojuced7

gojuced71#

已解决,node版本问题

c90pui9n

c90pui9n2#

@richardfan 能说一下哪个node版本可以解决这个问题么?我也出现了相同的问题

  • node: 6.13.1
  • npm: 6.10.2
5gfr0r5j

5gfr0r5j3#

node升级到10.16.1,问题解决。

2w3kk1z5

2w3kk1z54#

readme 里都不描述一下 依赖 node的版本 。。。。

2exbekwf

2exbekwf5#

vue-element-admin/package.json

Lines 105 to 108 in 12b44f5

| | "engines": { |
| | "node": ">=8.9", |
| | "npm": ">= 3.0.0" |
| | }, |

jexiocij

jexiocij6#

可我node是12.16.1也报这个错

相关问题