无法使用节点预处理程序重建串行端口:404状态代码下载64位nw.lib

Cannot rebuild serialport with node-pre-gyp: 404 status code downloading 64-bit nw.lib

本文关键字:状态 代码下载 64位 lib nw 串行端口 节点 重建 预处理程序      更新时间:2023-09-26

我正试图将johnny five与node webkit一起使用,所以我必须使用node pre-gyp重新构建它。我已经在全球范围内安装了node-pre-gip和nw-gip。我在windows 7 64位上运行,安装了32位版本的node 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上尝试过,没有任何更改。我真的很感激任何帮助!

https://github.com/rogerwang/nw-gyp.现在已经修复。检查https://github.com/rogerwang/nw-gyp/issues/45.