USB module failing to install


#1

leeja@DESKTOP-6O53A00 MINGW64 ~/Documents/work/presentily/app
$ npm install usb --build-from-source
npm WARN package.json presentily-desktop-app@1.0.0 No repository field.
npm WARN package.json presentily-desktop-app@1.0.0 No README data
npm WARN package.json presentily-desktop-app@1.0.0 No license field.

usb@1.2.0 install C:\Users\leeja\Documents\work\presentily\app\node_modules\usb
node-pre-gyp install --fallback-to-build

C:\Users\leeja\Documents\work\presentily\app\node_modules\usb>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” clean ) else (node “” clean )

C:\Users\leeja\Documents\work\presentily\app\node_modules\usb>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” configure --fallback-to-build --module=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding\usb_bindings.node --module_name=usb_bindings --module_path=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding --python=C:\Users\leeja.windows-build-tools\python27\python.exe --msvs_version=2015 ) else (node “” configure --fallback-to-build --module=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding\usb_bindings.node --module_name=usb_bindings --module_path=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding --python=C:\Users\leeja.windows-build-tools\python27\python.exe --msvs_version=2015 )

C:\Users\leeja\Documents\work\presentily\app\node_modules\usb>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” build --fallback-to-build --module=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding\usb_bindings.node --module_name=usb_bindings --module_path=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding ) else (node “” build --fallback-to-build --module=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding\usb_bindings.node --module_name=usb_bindings --module_path=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding )
Building the projects in this solution one at a time. To enable parallel build, please add the “/m” switch.
core.c
descriptor.c
hotplug.c
io.c
C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\libusb\libusb\os/threads_windows.h(47): error C2011: ‘timespec’: ‘struct’ type redefinition (compiling source file …\libusb\libusb\io.c) [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(39): note: see declaration of ‘timespec’ (compiling source file …\libusb\libusb\io.c)
…\libusb\libusb\io.c(1227): warning C4244: ‘=’: conversion from ‘time_t’ to ‘long’, possible loss of data [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\libusb\libusb\os/threads_windows.h(47): error C2011: ‘timespec’: ‘struct’ type redefinition (compiling source file …\libusb\libusb\descriptor.c) [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(39): note: see declaration of ‘timespec’ (compiling source file …\libusb\libusb\descriptor.c)
…\libusb\libusb\io.c(1902): warning C4244: ‘=’: conversion from ‘time_t’ to ‘long’, possible loss of data [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
…\libusb\libusb\io.c(2435): warning C4244: ‘=’: conversion from ‘time_t’ to ‘long’, possible loss of data [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
strerror.c
sync.c
C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\libusb\libusb\os/threads_windows.h(47): error C2011: ‘timespec’: ‘struct’ type redefinition (compiling source file …\libusb\libusb\hotplug.c) [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(39): note: see declaration of ‘timespec’ (compiling source file …\libusb\libusb\hotplug.c)
poll_windows.c
C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\libusb\libusb\os/threads_windows.h(47): error C2011: ‘timespec’: ‘struct’ type redefinition (compiling source file …\libusb\libusb\core.c) [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(39): note: see declaration of ‘timespec’ (compiling source file …\libusb\libusb\core.c)
threads_windows.c
C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\libusb\libusb\os/threads_windows.h(47): error C2011: ‘timespec’: ‘struct’ type redefinition (compiling source file …\libusb\libusb\strerror.c) [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(39): note: see declaration of ‘timespec’ (compiling source file …\libusb\libusb\strerror.c)
C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\libusb\libusb\os/threads_windows.h(47): error C2011: ‘timespec’: ‘struct’ type redefinition (compiling source file …\libusb\libusb\sync.c)windows_usb.c [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(39): note: see declaration of ‘timespec’ (compiling source file …\libusb\libusb\sync.c)
C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\libusb\libusb\os/threads_windows.h(47): error C2011: ‘timespec’: ‘struct’ type redefinition (compiling source file …\libusb\libusb\os\threads_windows.c) [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(39): note: see declaration of ‘timespec’ (compiling source file …\libusb\libusb\os\threads_windows.c)
…\libusb\libusb\os\threads_windows.c(194): warning C4244: ‘=’: conversion from ‘time_t’ to ‘long’, possible loss of data [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
…\libusb\libusb\os\threads_windows.c(196): warning C4244: ‘=’: conversion from ‘const time_t’ to ‘long’, possible loss of data [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\libusb\libusb\os/threads_windows.h(47): error C2011: ‘timespec’: ‘struct’ type redefinition (compiling source file …\libusb\libusb\os\poll_windows.c) [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(39): note: see declaration of ‘timespec’ (compiling source file …\libusb\libusb\os\poll_windows.c)
C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\libusb\libusb\os/threads_windows.h(47): error C2011: ‘timespec’: ‘struct’ type redefinition (compiling source file …\libusb\libusb\os\windows_usb.c) [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\time.h(39): note: see declaration of ‘timespec’ (compiling source file …\libusb\libusb\os\windows_usb.c)
…\libusb\libusb\os\windows_usb.c(586): warning C4244: ‘=’: conversion from ‘__int64’ to ‘unsigned int’, possible loss of data [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
…\libusb\libusb\os\windows_usb.c(1017): warning C4996: ‘GetVersionExA’: was declared deprecated [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\sysinfoapi.h(433): note: see declaration of ‘GetVersionExA’
…\libusb\libusb\os\windows_usb.c(1020): warning C4996: ‘GetVersionExA’: was declared deprecated [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\sysinfoapi.h(433): note: see declaration of ‘GetVersionExA’
…\libusb\libusb\os\windows_usb.c(1423): warning C4244: ‘=’: conversion from ‘__int64’ to ‘unsigned int’, possible loss of data [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
…\libusb\libusb\os\windows_usb.c(2558): warning C4018: ‘<’: signed/unsigned mismatch [C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\build\libusb.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.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:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200: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” “build” “–fallback-to-build” “–module=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding\usb_bindings.node” “–module_name=usb_bindings” "–module_path=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding"
gyp ERR! cwd C:\Users\leeja\Documents\work\presentily\app\node_modules\usb
gyp ERR! node -v v4.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute ‘node-gyp.cmd build --fallback-to-build --module=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding\usb_bindings.node --module_name=usb_bindings --module_path=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding’ (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:829:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\node_modules\node-pre-gyp\bin\node-pre-gyp” “install” "–fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\leeja\Documents\work\presentily\app\node_modules\usb
node-pre-gyp ERR! node -v v4.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok
Failed to execute ‘node-gyp.cmd build --fallback-to-build --module=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding\usb_bindings.node --module_name=usb_bindings --module_path=C:\Users\leeja\Documents\work\presentily\app\node_modules\usb\src\binding’ (1)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install” “usb” "–build-from-source"
npm ERR! node v4.6.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE

npm ERR! usb@1.2.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the usb@1.2.0 install script ‘node-pre-gyp install --fallback-to-build’.
npm ERR! This is most likely a problem with the usb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs usb
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR!
npm ERR! npm owner ls usb
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\leeja\Documents\work\presentily\app\npm-debug.log


#2

So that your message isn’t lost in the wall of text, you may want to extract the log, store it in a Gist and link to it there.