首页 > 解决方案 > 错误:错误:2006D080:BIO 例程:BIO_new_file:没有这样的文件

问题描述

我们有一个 node js 应用程序,在 node 版本 8 上运行,我们想将它迁移到版本 10,我已经重新安装 node js 10,之后我正在运行我的 node server.js,但它显示在错误下方。我发现它与 firebase 模块有关,我也升级了 fire base 模块,但它显示相同的错误。如何升级到节点 10 及其依赖模块?

Error: error:2006D080:BIO routines:BIO_new_file:no such file
at Sign.sign (internal/crypto/sig.js:83:26)
at Object.sign (C:\new-rest-api\node_modules\jwa\index.js:55:49)
at Object.jwsSign [as sign] (C:\new-rest-api\node_modules\jws\lib\sign-stream.js:23:24)
at Object.module.exports [as sign] (C:\new-rest-api\node_modules\firebase-admin\node_modules\jsonwebtoken\sign.js:186:16)
at CertCredential.createAuthJwt_ (C:\new-rest-api\node_modules\firebase-admin\lib\auth\credential.js:229:20)
at CertCredential.getAccessToken (C:\new-rest-api\node_modules\firebase-admin\lib\auth\credential.js:199:26)
at FirebaseAppInternals.getToken (C:\new-rest-api\node_modules\firebase-admin\lib\firebase-app.js:68:73)
at AuthTokenProvider.getToken (C:\new-rest-api\node_modules\@firebase\database\dist\cjs\src\core\AuthTokenProvider.js:34:49)
at PersistentConnection.establishConnection_ (C:\new-rest-api\node_modules\@firebase\database\dist\cjs\src\core\PersistentConnection.js:597:18)
at Timeout._onTimeout (C:\new-rest-api\node_modules\@firebase\database\dist\cjs\src\core\PersistentConnection.js:497:19)
at ontimeout (timers.js:425:11)
at tryOnTimeout (timers.js:289:5)
at listOnTimeout (timers.js:252:5)
at Timer.processTimers (timers.js:212:10)

标签: node.js

解决方案


我今天遇到了这个问题。我的问题是我的 OPENSSL_CONF 环境变量设置不正确。确保安装了 openssl 并且 OPENSSL_CONF 指向 openssl.cfg


推荐阅读