node.js - 擦除磁盘后使用 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 版本和 NPM 版本中。我恢复到旧版本并且错误消失了。好像如果您使用最新的 Node/NPM,Firebase 还没有完全支持它
推荐阅读
- java - 试图保存一个 HashMap
- 在 h2 数据库中由于“值太长 ... BINARY(255)”而失败
- django - “str”的 Pylint Django 模型实例没有成员
- php - Slim 3 框架 - 将数据从中间件传递到控制器 - 动作参数
- spring - 如何在百里香中设置变量?
- rendering - 缺少用于在 Colab 中渲染 OpenAI Gym 的包
- java - 如何将 jar 发布到 Nexus(快照存储库)?
- sql - 查询在oracle中花费了太多时间:由其他会话读取
- javascript - 如何在循环中对一堆查询进行排序?
- javascript - 设置状态不更新状态
- c++ - /usr/local/include/string.h:25:10:致命错误:找不到“plist/Node.h”文件