原因是使用的node版本问题,升级成16.16.0即可。
PS E:\learn\vue-next-admin-master> npm run dev
> vue-next-admin@2.4.32 dev E:\learn\vue-next-admin-master
> vite --force
file:///E:/learn/vue-next-admin-master/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:122:18)
at async link (internal/modules/esm/module_job.js:42:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-next-admin@2.4.32 dev: `vite --force`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-next-admin@2.4.32 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! C:\Users\18553\AppData\Roaming\npm-cache\_logs\2023-04-17T01_54_14_182Z-debug.log