项目场景:
主要报错:10% building 2/2 modules 0 activeError: error:0308010C:digital envelope rout
报错内容:
PS C:\Users\815\Desktop\新建文件夹 (2)\login> npm run serve
Debugger attached.
> snow@0.1.0 serve
> vue-cli-service serve
Debugger attached.
INFO Starting development server...
10% building 0/1 modules 1 active ...ckPath=/sockjs-node C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\webpack\hot\dev-server.js ./src/mai10% building 2/2 modules 0 activeError: 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 (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at iterateNormalLoaders (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
at C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\loader-runner\lib\LoaderRunner.js:236:3
at runSyncOrAsync (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
at iterateNormalLoaders (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
at Array.<anonymous> (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
10% building 2/3 modules 1 active ...件夹 (2)\login\node_modules\webpack-dev-server\client\index.js?http://192.168.23.215:8080&sockPath=/sockjs-nod10% building 2/5 modules 3 active ...sktop\新建文件夹 (2)\login\node_modules\babel-loader\lib\index.js!C:\Users\815\Desktop\新建文件夹 (2)\login\src\main.jsWaiting for the debugger to disconnect...
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 (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\webpack\lib\NormalModule.js:358:12
at C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\loader-runner\lib\LoaderRunner.js:373:3
at iterateNormalLoaders (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at Array.<anonymous> (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
at Storage.finished (C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
at C:\Users\815\Desktop\新建文件夹 (2)\login\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
at C:\Users\815\Desktop\新建文件夹 (2)\login\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',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v18.15.0
Waiting for the debugger to disconnect...
原因分析:
node.js 18 不兼容oppsll文章来源:https://www.toymoban.com/news/detail-663644.html
解决方案:
$env:NODE_OPTIONS="--openssl-legacy-provider"文章来源地址https://www.toymoban.com/news/detail-663644.html
最后重新执行下:npm run serve
到了这里,关于主要报错:10% building 2/2 modules 0 activeError: error:0308010C:digital envelope rout的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!