Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install from windows #10

Closed
sv1809 opened this issue May 8, 2014 · 8 comments
Closed

Can't install from windows #10

sv1809 opened this issue May 8, 2014 · 8 comments

Comments

@sv1809
Copy link

sv1809 commented May 8, 2014

I try install package with npm install from windows, but have a error: "\spi_binding.cc(66): fatal error C1021: invalid preprocessor command 'warning' [c:\UserData\git\Azure\node_modules\pi-spi\build\spi_binding.vcxproj]".
Part of log file:
error [email protected] install: node-gyp rebuild
84 error Exit status 1
85 error Failed at the [email protected] install script.
85 error This is most likely a problem with the pi-spi package,
85 error not with npm itself.
85 error Tell the author that this fails on your system:
85 error node-gyp rebuild
85 error You can get their info via:
85 error npm owner ls pi-spi
85 error There is likely additional logging output above.
86 error System Windows_NT 6.2.9200
87 error command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "pi-spi"
88 error cwd c:\UserData\git\Azure\spi
89 error node -v v0.10.26
90 error npm -v 1.4.3
91 error code ELIFECYCLE

@natevw
Copy link
Owner

natevw commented May 10, 2014

Is there a common Windows environment with SPI available you need this for? (This library is primarily targeted for Raspberry Pi and other Linux environments like Beagle Bone.)

@natevw
Copy link
Owner

natevw commented May 10, 2014

I would like to fix this though, BTW so it at least compiles a [non-working] library for random dependency situations that come up with e.g. Tessel. Just curious what your use case is.

natevw added a commit that referenced this issue Feb 22, 2015
@natevw natevw closed this as completed in c4bf856 Feb 24, 2015
@natevw
Copy link
Owner

natevw commented Feb 24, 2015

The installation error should now be fixed. There is still a weird warning, and you just get an error if you try to actually use it (see stub test for example).

For future reference (I have no plans at this point) I did come across this documentation:
http://www.ctcom.com.tw/doc/324260.pdf …but I am not sure what that's even for (common motherboards? uncommon peripheral chip?).

And I also signed up for https://dev.windows.com/en-us/featured/raspberrypi2support / https://www.windowsondevices.com/signup.aspx in case there's interesting API that is getting added.

@mattmazzola
Copy link

mattmazzola commented May 9, 2016

I'm still having trouble installing this on Windows.

Failed at the [email protected] install script 'node-gyp rebuild'.

See logs below. Are there any temporary work arounds?

I have a package that depends on pi-spi. I'm installing on a normal Windows machine instead of the Windows IoT and have run-time checks to not use the pi-spi library if it's running on windows instead of linux, but since the npm install fails it makes things difficult since it will complain the module doesn't exist.

893 info [email protected] Failed to exec install script
894 verbose unlock done using C:\Users\MattMazzola\AppData\Roaming\npm-cache\_locks\pi-spi-218a84d4a9e4b323.lock for C:\Users\MattMazzola\Source\Repos\colorqueue-firebase\node_modules\colorqueue\node_modules\pi-spi
895 verbose about to build C:\Users\MattMazzola\Source\Repos\colorqueue-firebase\node_modules\colorqueue
896 verbose unlock done using C:\Users\MattMazzola\AppData\Roaming\npm-cache\_locks\colorqueue-7e3a091488d87d5b.lock for C:\Users\MattMazzola\Source\Repos\colorqueue-firebase\node_modules\colorqueue
897 verbose stack Error: [email protected] install: `node-gyp rebuild`
897 verbose stack Exit status 1
897 verbose stack     at EventEmitter.<anonymous> (C:\Users\MattMazzola\AppData\Roaming\nvm\v4.2.1\node_modules\npm\lib\utils\lifecycle.js:217:16)
897 verbose stack     at emitTwo (events.js:87:13)
897 verbose stack     at EventEmitter.emit (events.js:172:7)
897 verbose stack     at ChildProcess.<anonymous> (C:\Users\MattMazzola\AppData\Roaming\nvm\v4.2.1\node_modules\npm\lib\utils\spawn.js:24:14)
897 verbose stack     at emitTwo (events.js:87:13)
897 verbose stack     at ChildProcess.emit (events.js:172:7)
897 verbose stack     at maybeClose (internal/child_process.js:818:16)
897 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
898 verbose pkgid [email protected]
899 verbose cwd C:\Users\MattMazzola\Source\Repos\colorqueue-firebase
900 error Windows_NT 10.0.14328
901 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-S" "colorqueue"
902 error node v4.2.1
903 error npm  v2.15.5
904 error code ELIFECYCLE
905 error [email protected] install: `node-gyp rebuild`
905 error Exit status 1
906 error Failed at the [email protected] install script 'node-gyp rebuild'.
906 error This is most likely a problem with the pi-spi package,
906 error not with npm itself.
906 error Tell the author that this fails on your system:
906 error     node-gyp rebuild
906 error You can get information on how to open an issue for this project with:
906 error     npm bugs pi-spi
906 error Or if that isn't available, you can get their info via:
906 error
906 error     npm owner ls pi-spi
906 error There is likely additional logging output above.
907 verbose exit [ 1, true ]

@natevw
Copy link
Owner

natevw commented May 14, 2016

@mattmazzola Hmm, sorry to hear this is giving you trouble. Are other native modules building fine with your node install? The intent is that this library will build on Windows, but not really work at runtime if you try to use it. (See #18 for future potential there…)

Looks like you also might be using nvm? Does npm install pi-spi work in a plain and empty folder? I do have a Win10 machine at my main office and so I can take a look sometime when I get a chance.

@mattmazzola
Copy link

Hmm... I tried installing it on an emtpy folder and got a slightly different error message this time which looks more helpful.

It appears it's specifically building/targeting Windows 8.1 and I don't have the Windows 8.1 SDK installed so it can't build. Perhaps there is a way to make it know that I'm on Windows 10 and adjust or something I can easily install that would allow it to work.

Error message below:

if not defined npm_config_node_gyp (node "C:\Users\MattMazzola\AppData\Roaming\nvm\v4.2.1\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.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error MSB803
6: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the pro
ject property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\MattMazzola\Source\Repos\pi
spitest\node_modules\pi-spi\build\spi_binding.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:\Users\MattMazzola\AppData\Roaming\nvm\v4.2.1\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.14328
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\MattMazzola\\AppData\\Roaming\\nvm\\v4.2.1\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\MattMazzola\Source\Repos\pispitest\node_modules\pi-spi
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 10.0.14328
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "pi-spi"
npm ERR! node v4.2.1
npm ERR! npm  v2.15.5
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
...

@natevw
Copy link
Owner

natevw commented Jun 5, 2017

@mattmazzola Looks like I really dropped the ball on this :-/ If this is something you still need help with or that I should look into, could you please file a new issue with details. Otherwise it looks like this thread is already closed so I'll just leave it unless it needs more attention.

@mattmazzola
Copy link

mattmazzola commented Jun 5, 2017

Yea, I'm not working on the project that need the library anymore so yea go ahead and close.

I saw this change for Node 8 which might be related:

fix gyp build configuration for Windows
nodejs/node@00a2aa0af5

Although, I don't think that is for Windows 10. From my understanding this build process is doing OS detection and then making assumptions about where to find a version of msbuild which should be there based on SDK which installed with operating system. Since it was written before Window 10 they don't have it updated to detect Windows 10 and look at the new location.

I'm hoping the WSL (Windows Subsystem for Linux) pulls through and allows it to work natively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants