natevw / node-nrf

Pure-JavaScript nRF24L01 driver library
117 stars 31 forks source link

NRF24 NPM Install Error #12

Closed Frijol closed 10 years ago

Frijol commented 10 years ago

Error from forum

Got this error installing NRF24 on my Windows Desktop. OSX laptop worked fine.

npm http GET registry.npmjs.org/rf-nrf24
npm http 304 registry.npmjs.org/rf-nrf24
npm http GET registry.npmjs.org/pi-spi
npm http GET registry.npmjs.org/queue-async
npm http GET registry.npmjs.org/pi-pins
npm http 304 registry.npmjs.org/pi-spi
npm http 304 registry.npmjs.org/pi-pins
npm http 304 registry.npmjs.org/queue-async

pi-spi@0.8.7 install D:\Projects\Tessel\tessel-code\node_modules\rf-nrf24\node
_modules\pi-spi
node-gyp rebuild
D:\Projects\Tessel\tessel-code\node_modules\rf-nrf24\node_modules\pi-spi>node "C
:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\nod
e-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  spi_binding.cc
..\spi_binding.cc(33): warning C4200: nonstandard extension used : zero-sized a
rray in struct/union [D:\Projects\Tessel\tessel-code\node_modules\rf-nrf24\node
modules\pi-spi\build\spibinding.vcxproj]
          Cannot generate copy-ctor or copy-assignment operator when UDT contai
  ns a zero-sized array
..\spi_binding.cc(66): fatal error C1021: invalid preprocessor command 'warning
' [D:\Projects\Tessel\tessel-code\node_modules\rf-nrf24\node_modules\pi-spi\bui
ld\spi_binding.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess.handle.onexit (childprocess.js:807:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Projects\Tessel\tessel-code\node_modules\rf-nrf24\node_modules\p
i-spi
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm http GET registry.npmjs.org/epoll
npm http 304 registry.npmjs.org/epoll
npm http GET registry.npmjs.org/bindings
npm http GET registry.npmjs.org/nan
npm http 304 registry.npmjs.org/bindings
npm http 304 registry.npmjs.org/nan

epoll@0.1.7 install D:\Projects\Tessel\tessel-code\node_modules\rf-nrf24\node_
modules\pi-pins\node_modules\epoll
node-gyp rebuild
D:\Projects\Tessel\tessel-code\node_modules\rf-nrf24\node_modules\pi-pins\node_m
odules\epoll>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\..
..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  epoll.cc
  Generating code
  Finished generating code
  epoll.vcxproj -> D:\Projects\Tessel\tessel-code\node_modules\rf-nrf24\node_mo
  dules\pi-pins\node_modules\epoll\build\Release\epoll.node
npm ERR! pi-spi@0.8.7 install: node-gyp rebuildnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pi-spi@0.8.7 install script.
npm ERR! This is most likely a problem with the pi-spi package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls pi-spi
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "rf-nrf24"
npm ERR! cwd D:\Projects\Tessel\tessel-code\nrf24
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     D:\Projects\Tessel\tessel-code\nrf24\npm-debug.log
npm ERR! not ok code 0

Any ideas?

natevw commented 10 years ago

Yeah, this is https://github.com/natevw/pi-spi/issues/10 which is pretty low priority because even if you could "build" it on Windows it wouldn't work.

Tessel is a special situation, because you need to install on a different platform than you actually will be using it on! For now you might just take the "pi-spi" and "pi-pins" deps out of the version published for Tessel if @jiahuang hasn't already?

jiahuang commented 10 years ago

Fixed for tessel.

FriedCircuits commented 10 years ago

Tested and changes worked on Tessel.

natevw commented 10 years ago

Great, thanks for the feedback! I'll close this since the rest of the story here can be tracked in #15.