小编use*_*028的帖子

为什么我不能使用 npm 安装这个模块?

我对 Node.JS 非常陌生,并且已经成功地在我的 Mac 上安装了一些软件包。但我正在尝试使用以下方法安装一个名为 sbrick-protocol 的模块:

npm install sbrick-protocol
Run Code Online (Sandbox Code Playgroud)

我得到了各种我不明白的奇怪输出:

Last login: Wed Jan  1 17:00:38 on ttys000
Gemixin@iMac ~ % npm install sbrick-protocol

> xpc-connection@0.1.4 install /Users/Gemixin/node_modules/xpc-connection
> node-gyp rebuild

  CXX(target) Release/obj.target/binding/src/XpcConnection.o
../src/XpcConnection.cpp:26:77: error: too few arguments to function call,
      single argument 'context' was not specified
  target->Set(Nan::New("XpcConnection").ToLocalChecked(), tmpl->GetFunction());
                                                          ~~~~~~~~~~~~~~~~~ ^
/Users/Gemixin/Library/Caches/node-gyp/13.5.0/include/node/v8.h:6283:3: note: 
      'GetFunction' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
  ^
/Users/Gemixin/Library/Caches/node-gyp/13.5.0/include/node/v8config.h:419:31: note: 
      expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/XpcConnection.cpp:103:54: error: too few arguments to function call,
      single …
Run Code Online (Sandbox Code Playgroud)

javascript node.js npm

2
推荐指数
2
解决办法
6043
查看次数

标签 统计

javascript ×1

node.js ×1

npm ×1