Expo React Native尝试在Web上启动时出错,如何修复?

l2osamch  于 2022-11-25  发布在  React
关注(0)|答案(1)|浏览(220)

基本上,当我创建一个新的博览会项目,并使用npm运行web它抛出我这个错误,我找不到解决方案,请帮助,谢谢
它确实工作,以打开它与android,问题是只在网络上运行

Logs for your project will appear below. Press Ctrl+C to exit.
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 (X:\DataYProgramas\ReactJS\expo4\openty\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (X:\DataYProgramas\ReactJS\expo4\openty\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (X:\DataYProgramas\ReactJS\expo4\openty\node_modules\webpack\lib\NormalModule.js:471:10)
    at X:\DataYProgramas\ReactJS\expo4\openty\node_modules\webpack\lib\NormalModule.js:503:5
    at X:\DataYProgramas\ReactJS\expo4\openty\node_modules\webpack\lib\NormalModule.js:358:12
    at X:\DataYProgramas\ReactJS\expo4\openty\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (X:\DataYProgramas\ReactJS\expo4\openty\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at Array.<anonymous> (X:\DataYProgramas\ReactJS\expo4\openty\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (X:\DataYProgramas\ReactJS\expo4\openty\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at X:\DataYProgramas\ReactJS\expo4\openty\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at X:\DataYProgramas\ReactJS\expo4\openty\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.12.1
tjvv9vkg

tjvv9vkg1#

您使用的是哪个版本的node.js,因为对我来说,它不能在最新版本(18.12.1)上工作,但可以在16.18.1上工作,但在16.18.1版本上不能在ios上工作

相关问题