yinxin630 / fiora

An interesting open source chat application. Developed with node.js, mongoDB, socket.io and react
https://fiora.suisuijiang.com
MIT License
6.68k stars 1.33k forks source link

构建前端网页一直出错 #532

Open hunteris666 opened 1 year ago

hunteris666 commented 1 year ago

尝试多次,多种解决方案均未能解决 root@206:~/fiora# yarn build:web yarn run v1.22.19 @fiora/web: Error: error:0308010C:digital envelope routines::unsupported @fiora/web: at new Hash (node:internal/crypto/hash:71:19) @fiora/web: at Object.createHash (node:crypto:133:10) @fiora/web: at BulkUpdateDecorator.hashFactory (/root/fiora/packages/web/node_modules/webpack/lib/util/createHash.js:145:18) @fiora/web: at BulkUpdateDecorator.update (/root/fiora/packages/web/node_modules/webpack/lib/util/createHash.js:46:50) @fiora/web: at RawSource.updateHash (/root/fiora/packages/web/node_modules/webpack/node_modules/webpack-sources/lib/RawSource.js:64:8) @fiora/web: at NormalModule._initBuildHash (/root/fiora/packages/web/node_modules/webpack/lib/NormalModule.js:868:17) @fiora/web: at handleParseResult (/root/fiora/packages/web/node_modules/webpack/lib/NormalModule.js:934:10) @fiora/web: at /root/fiora/packages/web/node_modules/webpack/lib/NormalModule.js:1026:4 @fiora/web: at processResult (/root/fiora/packages/web/node_modules/webpack/lib/NormalModule.js:743:11) @fiora/web: at /root/fiora/packages/web/node_modules/webpack/lib/NormalModule.js:807:5 @fiora/web: Browserslist: caniuse-lite is outdated. Please run: @fiora/web: npx browserslist@latest --update-db @fiora/web: Why you should do it regularly: @fiora/web: https://github.com/browserslist/browserslist#browsers-data-updating @fiora/web: node:internal/crypto/hash:71 @fiora/web: this[kHandle] = new _Hash(algorithm, xofLen); @fiora/web: ^ @fiora/web: Error: error:0308010C:digital envelope routines::unsupported @fiora/web: at new Hash (node:internal/crypto/hash:71:19) @fiora/web: at Object.createHash (node:crypto:133:10) @fiora/web: at BulkUpdateDecorator.hashFactory (/root/fiora/packages/web/node_modules/webpack/lib/util/createHash.js:145:18) @fiora/web: at BulkUpdateDecorator.update (/root/fiora/packages/web/node_modules/webpack/lib/util/createHash.js:46:50) @fiora/web: at RawSource.updateHash (/root/fiora/packages/web/node_modules/webpack/node_modules/webpack-sources/lib/RawSource.js:64:8) @fiora/web: at NormalModule._initBuildHash (/root/fiora/packages/web/node_modules/webpack/lib/NormalModule.js:868:17) @fiora/web: at handleParseResult (/root/fiora/packages/web/node_modules/webpack/lib/NormalModule.js:934:10) @fiora/web: at /root/fiora/packages/web/node_modules/webpack/lib/NormalModule.js:1026:4 @fiora/web: at processResult (/root/fiora/packages/web/node_modules/webpack/lib/NormalModule.js:743:11) @fiora/web: at /root/fiora/packages/web/node_modules/webpack/lib/NormalModule.js:807:5 { @fiora/web: opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], @fiora/web: library: 'digital envelope routines', @fiora/web: reason: 'unsupported', @fiora/web: code: 'ERR_OSSL_EVP_UNSUPPORTED' @fiora/web: } @fiora/web: Node.js v18.12.1 @fiora/web: error Command failed with exit code 1. @fiora/web: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. lerna ERR! yarn run build:web exited 1 in '@fiora/web' error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. root@206:~/fiora#

pengwenhua666 commented 1 year ago

同报错,大佬解决了吗?

hunteris666 commented 1 year ago

@pengwenhua666 ,没,我认为是环境问题(指Node.js

ouyangyanhuo commented 1 year ago

Node.js 版本切换到 v14,重新安装 yarn 并重新 安装依赖、构建客户端