hsiangleev / element-plus-admin

基于vite+ts+elementPlus

Home Page:https://element-plus-admin.hsianglee.cn/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

启动的时候提示

fallsea opened this issue · comments

element-plus-admin@0.0.0 dev E:\git\github\element-plus-admin
vite

internal/modules/cjs/loader.js:596
throw err;
^

Error: Cannot find module 'worker_threads'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (E:\git\github\element-plus-admin\node_modules\vite\dist\node\chunks\dep-efe32886.js:19:24)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! element-plus-admin@0.0.0 dev: vite
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the element-plus-admin@0.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@fallsea 应该是nodejs版本过低导致的吧,你的nodejs版本是多少
vite要求nodejs版本大于12,Vite requires Node.js version >=12.0.0.

@hsiangleev 非常感谢,确实是这个问题,升级到最新版本node就可以了