You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Node v20.5.1运行Zoom React会议SDK示例遇ERR_OSSL_EVP_UNSUPPORTED错误

解决Zoom React会议SDK示例启动时的ERR_OSSL_EVP_UNSUPPORTED错误

问题重现

运行Zoom React会议SDK示例项目,执行npm start时出现以下错误:

Error: error:0308010C:digital envelope routines::unsupported....

opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'

已尝试设置Node选项:

"scripts": {
    "start": "set SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts start",
    "build": "set SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts build"
}

并将Node版本从v20.5.1降级至18.xx、19.xx版本,问题仍未解决。

有效解决方法

1. 修正Windows下的Node选项设置

你当前的脚本里重复写了set SET,这会导致环境变量设置无效,修正为:

"scripts": {
    "start": "set NODE_OPTIONS=--openssl-legacy-provider && react-scripts start",
    "build": "set NODE_OPTIONS=--openssl-legacy-provider && react-scripts build"
}

如果是macOS/Linux系统,直接去掉set:

"scripts": {
    "start": "NODE_OPTIONS=--openssl-legacy-provider react-scripts start",
    "build": "NODE_OPTIONS=--openssl-legacy-provider react-scripts build"
}

2. 清除缓存并重新安装依赖

执行以下命令彻底清理缓存和依赖:

# 删除node_modules和lock文件
rm -rf node_modules package-lock.json yarn.lock
# 清除npm缓存
npm cache clean --force
# 重新安装依赖
npm install

3. 使用nvm锁定Node版本到16.x

部分旧版React项目对Node 18+兼容性不佳,建议用nvm切换到Node 16.x:

# 若未安装nvm,先完成安装
# 安装Node 16.x
nvm install 16
# 切换到Node 16
nvm use 16

之后重新执行npm install和npm start。

4. 升级react-scripts版本

如果项目使用的react-scripts版本过低,升级到最新稳定版:

npm install react-scripts@latest

内容的提问来源于stack exchange,提问作者Devon McGrath

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.11 07:42:09