首页 > 解决方案 > 擦除磁盘后使用 npm 安装 firebase 时出错

问题描述

我最近刚刚擦掉了我的笔记本电脑,我正在我的一个项目上重新安装 firebase,但现在我收到了这个错误

../ext/call.cc:104:53: error: no matching member function for call to 'Get'
    Local<String> current_key(Nan::To<String>(keys->Get(i)).ToLocalChecked());
                                              ~~~~~~^~~
/Users/timothyhsu/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3594:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/timothyhsu/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3597:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
../ext/call.cc:681:27: error: no matching member function for call to 'Get'
    if (!op->ParseOp(obj->Get(type), &ops[i])) {
                     ~~~~~^~~
/Users/timothyhsu/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3594:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/timothyhsu/Library/Caches/node-gyp/13.5.0/include/node/v8.h:3597:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,

有谁知道这是否是某种不兼容问题?我在使用之前安装它没有问题,npm install --save firebase但现在我遇到了这个错误。

谢谢!

标签: node.jsfirebase

解决方案


问题出在我的 Node 版本和 NPM 版本中。我恢复到旧版本并且错误消失了。好像如果您使用最新的 Node/NPM,Firebase 还没有完全支持它


推荐阅读