React-native 编译错误: opensslErrorStack: [ '错误:03000086:数字信封例程::初始化错误' ],

mah*_*rsh 1 android node.js reactjs react-native

opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
Run Code Online (Sandbox Code Playgroud)
library: 'digital envelope routines',

reason: 'unsupported',

code: 'ERR_OSSL_EVP_UNSUPPORTED'
Run Code Online (Sandbox Code Playgroud)

我更新了我的节点版本,然后获取了此类错误。

小智 7

如果您已将 Node 版本更新到 17+,则还需要将 React-scripts 升级到版本 5 或更高版本。看这里

您可以按照Create React Appnpm install react-scripts@latest站点中的说明运行 来执行此操作。

  • 这个答案针对的是 React 应用程序。OP问题是针对react-native的,可以从错误类型以及问题标签推断出来 (2认同)