这里是看到npm run dev 无法正常运行
PS D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui> npm run dev
> ruoyi@3.6.2 dev D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui
> vue-cli-service serve
INFO Starting development server...
10% building 2/5 modules 3 active ...ce\RuoYi-Cloud-master\ruoyi-ui\node_modules\eslint-loader\index.js??ref--13-0!D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\src\main.jsError: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\webpack\lib\NormalModule.js:471:10)
at D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\webpack\lib\NormalModule.js:503:5
at D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\webpack\lib\NormalModule.js:358:12
at D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at iterateNormalLoaders (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
at D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\loader-runner\lib\LoaderRunner.js:236:3
at runSyncOrAsync (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
at iterateNormalLoaders (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
at Array.<anonymous> (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
node:internal/crypto/hash:71
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\webpack\lib\NormalModule.js:471:10)
at D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\webpack\lib\NormalModule.js:503:5
at D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\webpack\lib\NormalModule.js:358:12
at D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at Array.<anonymous> (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
at D:\IDEA_WorkSpace\RuoYi-Cloud-master\ruoyi-ui\node_modules\graceful-fs\graceful-fs.js:123:16
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Program Files (x86)\nodejs\node_cache\_logs\2023-05-23T09_04_08_745Z-debug.log
在仔细研究后,发现是nodejs版本太高的问题,出现该问题的主要原因是我用了nodejs.18,后面换回nodejs 16就能正常运行了。相关的nodejs更改版本的链接https://blog.csdn.net/m0_69605915/article/details/126242838?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168500229816800217294278%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=168500229816800217294278&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-126242838-null-null.142^v88^control_2,239^v2^insert_chatgpt&utm_term=nodejs%E6%9B%B4%E6%8D%A2%E7%89%88%E6%9C%AC&spm=1018.2226.3001.4187