在 Mac OS X 10.11 上安装 vcremote 时出错 [英] Error installing vcremote on Mac OS X 10.11

查看:83
本文介绍了在 Mac OS X 10.11 上安装 vcremote 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用sudo npm install -g --unsafe-perm vcremote"安装 vcremote,但出现以下错误:

I am trying to install vcremote with 'sudo npm install -g --unsafe-perm vcremote' but getting below error:

/usr/local/bin/vcremote -> /usr/local/lib/node_modules/vcremote/bin/vcremote

> thread-sleep@1.0.4 install /usr/local/lib/node_modules/vcremote/node_modules/thread-sleep

> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! UNCAUGHT EXCEPTION 

node-pre-gyp ERR! stack Error: Cannot find module 'internal/fs'

node-pre-gyp ERR! stack     at Function.Module._resolveFilename (module.js:472:15)

node-pre-gyp ERR! stack     at Function.Module._load (module.js:420:25)

node-pre-gyp ERR! stack     at Module.require (module.js:500:17)

node-pre-gyp ERR! stack     at require (internal/module.js:20:19)

node-pre-gyp ERR! stack     at evalmachine.<anonymous>:17:20

node-pre-gyp ERR! stack     at Object.<anonymous> (/usr/local/lib/node_modules/vcremote/node_modules/thread-sleep/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js:11:1)

node-pre-gyp ERR! stack     at Module._compile (module.js:573:32)

node-pre-gyp ERR! stack     at Object.Module._extensions..js (module.js:582:10)

node-pre-gyp ERR! stack     at Module.load (module.js:490:32)

node-pre-gyp ERR! stack     at tryModuleLoad (module.js:449:12)

node-pre-gyp ERR! System Darwin 15.6.0

node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/vcremote/node_modules/thread-sleep/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"

node-pre-gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/thread-sleep

node-pre-gyp ERR! node -v v7.1.0

node-pre-gyp ERR! node-pre-gyp -v v0.6.9

node-pre-gyp ERR! This is a bug in `node-pre-gyp`.

node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:

node-pre-gyp ERR!     <https://github.com/mapbox/node-pre-gyp/issues>

> node-ios-device@0.5.2 install /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device

> node-gyp rebuild

  CXX(target) Release/obj.target/node_module_version/src/node-module-version.o

  LINK(target) Release/node_module_version

  CXX(target) Release/obj.target/node_ios_device/src/ios-device.o

In file included from ../src/ios-device.cpp:8:

In file included from ../../nan/nan.h:182:

../../nan/nan_maybe_43_inl.h:221:17: warning: 'CloneElementAt' is deprecated [-Wdeprecated-declarations]

  return array->CloneElementAt(GetCurrentContext(), index);

                ^

/Users/Sibridge/.node-gyp/7.1.0/include/node/v8.h:3056:36: note: 'CloneElementAt' has been explicitly marked deprecated here

                MaybeLocal<Object> CloneElementAt(Local<Context> context,

                                   ^

In file included from ../src/ios-device.cpp:8:

In file included from ../../nan/nan.h:188:

In file included from ../../nan/nan_new.h:189:

../../nan/nan_implementation_12_inl.h:40:29: warning: 'New' is deprecated [-Wdeprecated-declarations]

  return v8::BooleanObject::New(value).As<v8::BooleanObject>();

                            ^

/Users/Sibridge/.node-gyp/7.1.0/include/node/v8.h:4048:56: note: 'New' has been explicitly marked deprecated here

  V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));

                                                       ^

In file included from ../src/ios-device.cpp:8:

../../nan/nan.h:590:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'

      v8::Isolate::GCEpilogueCallback callback

      ~~~~~~~~~~~~~^

../../nan/nan.h:596:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'

      v8::Isolate::GCEpilogueCallback callback) {

      ~~~~~~~~~~~~~^

../../nan/nan.h:601:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'

      v8::Isolate::GCPrologueCallback callback

      ~~~~~~~~~~~~~^

../../nan/nan.h:607:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'

      v8::Isolate::GCPrologueCallback callback) {

      ~~~~~~~~~~~~~^

../../nan/nan.h:1927:15: warning: 'SetAccessor' is deprecated [-Wdeprecated-declarations]

  return obj->SetAccessor(

              ^

/Users/Sibridge/.node-gyp/7.1.0/include/node/v8.h:2761:22: note: 'SetAccessor' has been explicitly marked deprecated here

                bool SetAccessor(Local<Name> name,

                     ^

3 warnings and 4 errors generated.

make: *** [Release/obj.target/node_ios_device/src/ios-device.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:276:23)

gyp ERR! stack     at emitTwo (events.js:106:13)

gyp ERR! stack     at ChildProcess.emit (events.js:191:7)

gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

gyp ERR! System Darwin 15.6.0

gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device

gyp ERR! node -v v7.1.0

gyp ERR! node-gyp -v v3.4.0

gyp ERR! not ok 

/usr/local/lib

└── (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: thread-sleep@1.0.4 (node_modules/vcremote/node_modules/thread-sleep):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: thread-sleep@1.0.4 install: `node-pre-gyp install --fallback-to-build`

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 7

npm ERR! Darwin 15.6.0

npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "--unsafe-perm=true" "vcremote"

npm ERR! node v7.1.0

npm ERR! npm  v3.10.9

npm ERR! code ELIFECYCLE

npm ERR! node-ios-device@0.5.2 install: `node-gyp rebuild`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the node-ios-device@0.5.2 install script 'node-gyp rebuild'.

npm ERR! Make sure you have the latest version of node.js and npm installed.

npm ERR! If you do, this is most likely a problem with the node-ios-device package,

npm ERR! not with npm itself.

npm ERR! Tell the author that this fails on your system:

npm ERR!     node-gyp rebuild

npm ERR! You can get information on how to open an issue for this project with:

npm ERR!     npm bugs node-ios-device

npm ERR! Or if that isn't available, you can get their info via:

npm ERR!     npm owner ls node-ios-device

npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

npm ERR!     /Users/Sibridge/npm-debug.log

npm ERR! code 1

我已经尝试卸载并重新安装 node-gyp,但没有成功.

I have already tried uninstalling and reinstalling node-gyp, but it didn't work.

如何解决?

推荐答案

看起来像一个错误已提交给 Microsoft(请参阅 https://connect.microsoft.com/VisualStudio/Feedback/Details/3110480).看来这是一个过时的依赖项的问题,它不适用于较新 (>6.5) 版本的节点.

It looks like a bug has been filed with Microsoft (see https://connect.microsoft.com/VisualStudio/Feedback/Details/3110480). It appears that this is an issue with an outdated dependency that doesn't work with newer (>6.5) versions of node.

有关于如何手动更新依赖项的详细步骤https://social.msdn.microsoft.com/Forums/vstudio/en-US/77545f82-6f66-47d6-b00c-02d73089cb00/installing-vcremote?forum=vcgeneral.

There are detailed steps to how to manually update the dependency at https://social.msdn.microsoft.com/Forums/vstudio/en-US/77545f82-6f66-47d6-b00c-02d73089cb00/installing-vcremote?forum=vcgeneral.

您需要将 ioslib 依赖项更新为 1.0.3,将 node-ios-device 更新为 1.1.0.那对我有用.降级到节点 6.5 也可能有效.

You need to update the ioslib dependency to 1.0.3 and the node-ios-device to 1.1.0. That worked for me. Downgrading to node 6.5 might work as well.

这篇关于在 Mac OS X 10.11 上安装 vcremote 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆