【发布时间】:2016-02-10 08:58:47
【问题描述】:
我正在使用 Node WebKit 开发应用程序,我需要访问我的 PC 的 SerialPort(使用 Windows 8)。
为了安装带有 C/C++ 插件的 3rd 方模块,我按照以下链接中的指南进行操作:https://github.com/nwjs/nw.js/wiki/Using-Node-modules#3rd-party-modules-with-cc-addons。当我使用命令“nw-gyp rebuild --target=0.12.4”重建模块“serialport”(以前使用“npm install serialport”命令安装)时,我收到以下错误:
gyp: Undefined variable module_name in binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\LucaG.SEAV\AppData\Roaming
\npm\node_modules\nw-gyp\lib\configure.js:353:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:
12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Users\\LucaG.SEAV\\AppData\\Roaming\\npm\\node_modu
les\\nw-gyp\\bin\\nw-gyp.js" "rebuild" "--target=0.12.2"
gyp ERR! cwd C:\Sources\INT2292App\node_modules\serialport
gyp ERR! node -v v0.10.40
gyp ERR! nw-gyp -v v0.12.4
gyp ERR! not ok
我看到第一个错误是“gyp: Undefined variable module_name in binding.gyp”
我该如何解决这个问题?
我使用的是 Node WebKit v0.12.3
【问题讨论】:
标签: javascript node.js serial-port webkit node-webkit