赞
踩
D:\workspace\ui>npm run dev
> jeeplus-ui@1.6.3 dev D:\workspace\ui > vite file:///D:/workspace/ui/node_modules/vite/bin/vite.js:7 await import('source-map-support').then((r) => r.default.install()) ^^^^^ SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18) at async link (internal/modules/esm/module_job.js:42:21) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! jeeplus-ui@1.6.3 dev: `vite` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the jeeplus-ui@1.6.3 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! D:\software\NodeJs\node_cache\_logs\2023-04-18T06_21_34_069Z-debug.log
vite -v
如果没有安装就执行安装命令。
打开命令窗口,执行命令
npm install vite -g
如果执行该命令报错:SyntaxError:Unexpected reserved word?,需要将nodejs升级至14及以上
先查看一下你本地的nodejs版本是多少:
node -v
https://nodejs.org/download/release/v14.18.3/
下载完成以后,再执行:
npm install
npm run dev
就可以了,亲测可用。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。