noble / node-bluetooth-hci-socket

MIT License
154 stars 185 forks source link

Windows installation fails #38

Closed pelikhan closed 8 years ago

pelikhan commented 8 years ago

Having trouble "npm installing" node-bbc-microbit on Windows 10 x64, node 6.x, VS2015.

> bluetooth-hci-socket@0.5.1 install C:\gh\node-bbc-microbit\node_modules\bluetooth-hci-socket
> node-gyp rebuild

C:\gh\node-bbc-microbit\node_modules\bluetooth-hci-socket>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  win_delay_load_hook.c
C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error
C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers [C:\gh\node-bbc-microbit\node_m
odules\bluetooth-hci-socket\build\binding.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declarat
  ion of '__pfnDliNotifyHook2'
gyp ERR! build error
gyp ERR! stack Error: `msbuild` 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: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 Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\gh\node-bbc-microbit\node_modules\bluetooth-hci-socket
gyp ERR! node -v v6.5.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:bluetooth-hci-socket@0.5.1 bluetooth-hci-socket@0.5.1 install: `node-gyp rebuild`
npm WARN install:bluetooth-hci-socket@0.5.1 Exit status 1
npm WARN optional Skipping failed optional dependency /noble/xpc-connection:
npm WARN notsup Not compatible with your operating system or architecture: xpc-connection@0.1.4
sandeepmistry commented 8 years ago

This is a duplicate for #37 ar #35, please see https://github.com/sandeepmistry/node-bluetooth-hci-socket/issues/37#issuecomment-247744650 or https://github.com/sandeepmistry/node-bluetooth-hci-socket/issues/35#issuecomment-246177078 for the solution.