Я получаю сообщение об ошибке при попытке установить Firebase-admin SDK. Я не получаю никаких ошибок при работе на своем компьютере, но не могу настроить общий хостинг.
МОЙ КОД СОЕДИНЕНИЯ:
var serviceAccount = require("/home/maksuboi/firebase_admin_connection.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: 'https://********.firebaseio.com'
});
ОШИБКА
const ret = this[kHandle].sign(data, format, type, passphrase, rsaPadding,
^
Error: error:02016002:system library:stat:No such file or directory
at Sign.sign (internal/crypto/sig.js:86:29)
at Object.sign (/home/maksoboi/nodevenv/app/12/lib/node_modules/jsonwebtoken/node_modules/jwa/index.js:152:45)
at Object.jwsSign [as sign] (/home/maksoboi/nodevenv/app/12/lib/node_modules/jsonwebtoken/node_modules/jws/lib/sign-stream.js:32:24)
at Object.module.exports [as sign] (/home/maksoboi/nodevenv/app/12/lib/node_modules/jsonwebtoken/sign.js:186:16)
at ServiceAccountCredential.createAuthJwt_ (/home/maksoboi/nodevenv/app/12/lib/node_modules/firebase-admin/lib/auth/credential.js:101:20)
at ServiceAccountCredential.getAccessToken (/home/maksoboi/nodevenv/app/12/lib/node_modules/firebase-admin/lib/auth/credential.js:75:26)
at FirebaseAppInternals.getToken (/home/maksoboi/nodevenv/app/12/lib/node_modules/firebase-admin/lib/firebase-app.js:64:73)
at AuthTokenProvider.getToken (/home/maksoboi/nodevenv/app/12/lib/node_modules/@firebase/database/dist/index.node.cjs.js:9231:27)
at PersistentConnection.establishConnection_ (/home/maksoboi/nodevenv/app/12/lib/node_modules/@firebase/database/dist/index.node.cjs.js:12133:18)
at Timeout._onTimeout (/home/maksoboi/nodevenv/app/12/lib/node_modules/@firebase/database/dist/index.node.cjs.js:12035:19) {
opensslErrorStack: [
'error:0E07606D:configuration file routines:module_run:module initialization error',
'error:0E07B075:configuration file routines:ssl_module_init:ssl command section empty'
],
library: 'system library',
function: 'stat',
reason: 'No such file or directory',
code: 'ERR_OSSL_SYS_NO_SUCH_FILE_OR_DIRECTORY'
}