问题
Error: error:0308010C:digital envelope routines::unsupported
原因
主要是因为 nodeJs V17 版本发布了 OpenSSL3.0 对算法和秘钥大小增加了更为严格的限制,nodeJs v17 之前版本没影响,但 V17 和之后版本会出现这个错误。 我的node版本是v18+
解决方案
设置全局变量
Linux & Mac OS:
export NODE_OPTIONS=--openssl-legacy-provider
Windows:
set NODE_OPTIONS=--openssl-legacy-provider
切换node版本
nvm use x.x.x