我正在尝试将 johnny-5 与 node-webkit 一起使用,所以我必须使用 node-pre-gyp 重建它。我在全球范围内安装了 node-pre-gyp 和 nw-gyp。我在 Windows 7 64 位上运行,并且安装了 32 位版本的节点 0.10.32 和 32 位版本的 Python 2.7.3 以及 Visual Studio 2012;它们都在系统路径中。
当我运行时,npm install johnny-five --runtime=node-webkit --target=0.8.6
我收到以下错误消息:
> serialport@1.4.6 install C:\Users\ANTON_LAPTOP\Documents\Programming Projects\ROV\node_
modules\johnny-five\node_modules\serialport
> node-pre-gyp install --fallback-to-build
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading 64-bit nw.lib
gyp ERR! stack at Request.<anonymous> (C:\Users\ANTON_LAPTOP\AppData\Roaming\npm\node
_modules\nw-gyp\lib\install.js:317:20)
gyp ERR! stack at Request.emit (events.js:117:20)
gyp ERR! stack at Request.onRequestResponse (C:\Users\ANTON_LAPTOP\AppData\Roaming\np
m\node_modules\nw-gyp\node_modules\request\request.js:1247:10)
gyp ERR! stack at ClientRequest.emit (events.js:95:17)
gyp ERR! stack at HTTPParser.parserOnIncomingClient (http.js:1692:21)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:
121:23)
gyp ERR! stack at Socket.socketOnData (http.js:1587:20)
gyp ERR! stack at TCP.onread (net.js:527:27)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Users\\ANTON_LAPTOP\\AppData\\Roaming\\npm\\node_modules\\nw
-gyp\\bin\\nw-gyp.js" "rebuild" "--name=serialport" "--configuration=Release" "--module_n
ame=serialport" "--version=1.4.6" "--major=1" "--minor=4" "--patch=6" "--runtime=node-web
kit" "--node_abi=node-webkit-v11" "--target=0.8.6" "--platform=win32" "--target_platform=
win32" "--arch=ia32" "--target_arch=ia32" "--module_main=./serialport" "--host=https://no
de-serialport.s3.amazonaws.com/" "--module_path=C:\\Users\\ANTON_LAPTOP\\Documents\\Progr
amming Projects\\ROV\\node_modules\\johnny-five\\node_modules\\serialport\\build\\serialp
ort\\v1.4.6\\Release\\node-webkit-v11-win32-ia32" "--remote_path=./serialport/v1.4.6/Rele
ase/" "--package_name=node-webkit-v11-win32-ia32.tar.gz" "--staged_tarball=build\\stage\\
serialport\\v1.4.6\\Release\\node-webkit-v11-win32-ia32.tar.gz" "--hosted_path=https://no
de-serialport.s3.amazonaws.com/serialport/v1.4.6/Release/" "--hosted_tarball=https://node
-serialport.s3.amazonaws.com/serialport/v1.4.6/Release/node-webkit-v11-win32-ia32.tar.gz"
gyp ERR! cwd C:\Users\ANTON_LAPTOP\Documents\Programming Projects\ROV\node_modules\johnny
-five\node_modules\serialport
gyp ERR! node -v v0.10.32
gyp ERR! nw-gyp -v v0.12.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'nw-gyp.cmd rebuild --name=serialport --
configuration=Release --module_name=serialport --version=1.4.6 --major=1 --minor=4 --patc
h=6 --runtime=node-webkit --node_abi=node-webkit-v11 --target=0.8.6 --platform=win32 --ta
rget_platform=win32 --arch=ia32 --target_arch=ia32 --module_main=./serialport --host=http
s://node-serialport.s3.amazonaws.com/ --module_path=C:\Users\ANTON_LAPTOP\Documents\Progr
amming Projects\ROV\node_modules\johnny-five\node_modules\serialport\build\serialport\v1.
4.6\Release\node-webkit-v11-win32-ia32 --remote_path=./serialport/v1.4.6/Release/ --packa
ge_name=node-webkit-v11-win32-ia32.tar.gz --staged_tarball=build\stage\serialport\v1.4.6\
Release\node-webkit-v11-win32-ia32.tar.gz --hosted_path=https://node-serialport.s3.amazon
aws.com/serialport/v1.4.6/Release/ --hosted_tarball=https://node-serialport.s3.amazonaws.
com/serialport/v1.4.6/Release/node-webkit-v11-win32-ia32.tar.gz' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\ANTON_LAPTOP\Documents\
Programming Projects\ROV\node_modules\johnny-five\node_modules\serialport\node_modules\no
de-pre-gyp\lib\util\compile.js:76:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:98:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:756:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:823:
5)
node-pre-gyp ERR! System Windows_NT 6.1.7601
node-pre-gyp ERR! command "node" "C:\\Users\\ANTON_LAPTOP\\Documents\\Programming Project
s\\ROV\\node_modules\\johnny-five\\node_modules\\serialport\\node_modules\\node-pre-gyp\\
bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\ANTON_LAPTOP\Documents\Programming Projects\ROV\node_modul
es\johnny-five\node_modules\serialport
node-pre-gyp ERR! node -v v0.10.32
node-pre-gyp ERR! node-pre-gyp -v v0.5.19
node-pre-gyp ERR! not ok
Failed to execute 'nw-gyp.cmd rebuild --name=serialport --configuration=Release --module_
name=serialport --version=1.4.6 --major=1 --minor=4 --patch=6 --runtime=node-webkit --nod
e_abi=node-webkit-v11 --target=0.8.6 --platform=win32 --target_platform=win32 --arch=ia32
--target_arch=ia32 --module_main=./serialport --host=https://node-serialport.s3.amazonaw
s.com/ --module_path=C:\Users\ANTON_LAPTOP\Documents\Programming Projects\ROV\node_module
s\johnny-five\node_modules\serialport\build\serialport\v1.4.6\Release\node-webkit-v11-win
32-ia32 --remote_path=./serialport/v1.4.6/Release/ --package_name=node-webkit-v11-win32-i
a32.tar.gz --staged_tarball=build\stage\serialport\v1.4.6\Release\node-webkit-v11-win32-i
a32.tar.gz --hosted_path=https://node-serialport.s3.amazonaws.com/serialport/v1.4.6/Relea
se/ --hosted_tarball=https://node-serialport.s3.amazonaws.com/serialport/v1.4.6/Release/n
ode-webkit-v11-win32-ia32.tar.gz' (1)
npm WARN optional dep failed, continuing serialport@1.4.6
johnny-five@0.8.19 node_modules\johnny-five
├── ease-component@1.0.0
├── descriptor@0.1.0
├── temporal@0.3.8
├── colors@1.0.3
├── es6-shim@0.20.0
├── nanotimer@0.3.1
├── firmata@0.3.3 (browser-serialport@1.0.6)
├── lodash@2.4.1
└── galileo-io@0.3.9 (graceful-fs@2.0.3, es6-promise@2.0.0, remapped@0.2.1)
我曾尝试使用 运行该过程,--target_arch=ia32
但没有任何效果。我也在 64 位节点和 python 上尝试过这个,没有任何变化。我真的很感激任何帮助!