我想通过Windows 8.1桌面系统显式蓝牙设备从obd-2获取汽车实时数据。为此,我使用命令提示符安装了Node.js,NPM。我还安装了NPM软件包,例如:
.npm install -g windows-build-tools
.npm install -g node-gyp
.npm install --global --production windows-build-tools
.node-gyp rebuild --GTK_Root=C:\Users\davidlop\Documents\Software\GTK
.npm install bluetooth-serial-port
.npm install bluetooth-obd
在安装Bluetooth-obd软件包时出现这样的错误。
F:\OBD>npm install bluetooth-obd
> bluetooth-serial-port@2.1.7 install F:\OBD\node_modules\bluetooth-serial-port
> node-gyp configure build
F:\OBD\node_modules\bluetooth-serial-port>if not defined npm_config_node_gyp (no
de "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp
-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure build ) else (node
"C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
" configure build )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Build
Tools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:240:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej
s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "bui
ld"
gyp ERR! cwd F:\OBD\node_modules\bluetooth-serial-port
gyp ERR! node -v v10.14.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'F:\OBD\package.json'
npm WARN OBD No description
npm WARN OBD No repository field.
npm WARN OBD No README data
npm WARN OBD No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bluetooth-serial-port@2.1.7 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bluetooth-serial-port@2.1.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache\_logs\2018-12-26T07_03_22_
908Z-debug.log
请任何人解决我的问题。