尝试安装asyncawait模块,总是失败并返回相同的错误

时间:2019-02-04 16:24:20

标签: node.js npm

我正在尝试使用asyncawait安装npm install asyncawait模块。但是,它始终使我失败,并且它似乎与node-gyp模块有关,但是我已经在Mac上安装了最新版本。我不知道如何解决它,它曾经可以正常工作。这是错误日志:

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!

> fibers@2.0.2 install /Users/MyUser/Documents/node_modules/fibers
> node build.js || nodejs build.js

  CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc:318:3: warning: ignoring return value of function declared with
      'warn_unused_result' attribute [-Wunused-result]
                object->SetAccessor(isolate->GetCurrentContext(), name, ...
                ^~~~~~~~~~~~~~~~~~~
../src/fibers.cc:464:24: warning: 'Utf8Value' is deprecated: Use Isolate version
      [-Wdeprecated-declarations]
                                        String::Utf8Value stack(uni::Der...
                                                          ^
/Users/MyUser/.node-gyp/11.7.0/include/node/v8.h:2991:5: note: 'Utf8Value' has
      been explicitly marked deprecated here
    V8_DEPRECATED("Use Isolate version",
    ^
/Users/MyUser/.node-gyp/11.7.0/include/node/v8config.h:326:29: note: expanded
      from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/fibers.cc:686:66: error: too few arguments to function call, expected at
      least 2, have 1
  ...Script::Compile(uni::NewLatin1String(that.isolate, "void 0;"));
     ~~~~~~~~~~~~~~~                                              ^
/Users/MyUser/.node-gyp/11.7.0/include/node/v8.h:1359:3: note: 'Compile'
      declared here
  static V8_WARN_UNUSED_RESULT MaybeLocal<Script> Compile(
  ^
../src/fibers.cc:701:66: error: too few arguments to function call, single
      argument 'context' was not specified
  ...uni::Reset(that.isolate, fatal_stack, try_catch.StackTrace());
                                           ~~~~~~~~~~~~~~~~~~~~ ^
/Users/MyUser/.node-gyp/11.7.0/include/node/v8.h:8878:3: note: 'StackTrace'
      declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> StackTrace(
  ^
/Users/MyUser/.node-gyp/11.7.0/include/node/v8config.h:418:31: note: expanded
      from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
2 warnings and 2 errors generated.
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:188:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /Users/MyUser/Documents/pws/node_modules/fibers
gyp ERR! node -v v11.7.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
Alpine users please run: `sudo apk add python make g++`
sh: nodejs: command not found
npm WARN mobx-react@5.4.3 requires a peer of mobx@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN mobx-react@5.4.3 requires a peer of react@^0.13.0 || ^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-dropdown@1.6.3 requires a peer of react@^0.14.7 || ^15.0.0-0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-dropdown@1.6.3 requires a peer of react-dom@^0.14.7 || ^15.0.0-0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-hot-loader@4.6.3 requires a peer of react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-hot-loader@4.6.3 requires a peer of react-dom@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-tabs@2.3.0 requires a peer of react@^0.14.9 || ^15.3.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN redoc@2.0.0-alpha.41 requires a peer of mobx@^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN redoc@2.0.0-alpha.41 requires a peer of react@^16.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN redoc@2.0.0-alpha.41 requires a peer of react-dom@^16.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN redoc@2.0.0-alpha.41 requires a peer of styled-components@^4.0.1 but none is installed. You must install peer dependencies yourself.

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@2.0.2 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the fibers@2.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

0 个答案:

没有答案