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

Possible need for requirement for option 1 Windows #1116

Closed
OwenBrotherwood opened this issue Feb 15, 2017 · 8 comments
Closed

Possible need for requirement for option 1 Windows #1116

OwenBrotherwood opened this issue Feb 15, 2017 · 8 comments

Comments

@OwenBrotherwood
Copy link

https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk may be required
option 1 failed for me: I did not analyse failure but went to option 2
https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk is a requirement and could be something to do with option 1 failure.

At some stage, I take a deep breath and repeat the experience : just not today

@joaocgreis
Copy link
Member

@OwenBrotherwood I don't have any context to understand your issue. Any information regarding what you were trying to accomplish, steps to reproduce and why this is a bug in node-gyp would be essential to help you.

As far as guesswork goes: you need to install the Windows 8 SDK when you install Visual Studio. We are working to support the Windows 10 SDK with Visual Studio 2017, but the work has not landed yet.

@OwenBrotherwood
Copy link
Author

OwenBrotherwood commented Feb 17, 2017

Context;
On Windows, Option 1 is possibly not complete in it's requirements.
I am presently wiping my Windows 10 machine and return with a comment as to if Option 1 was enough for node-gyp or if a further step is required in order to node-gyp on Windows as when developing on a laptop with no need for a complete Visual Studio 20XX, npm install is "nice" as I am very old and like to just build instead of click click

Option 1: Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).

"I'll be back"


Own notes:
Windows 10
nwjs ; Chromium 56 + Node 7.5.0 suk ? need for 7.5.0 so install node 7.5.0 and hope for no issues elsewhere
install node 7.5.0 and
elevated install of npm install --global --production windows-build-tools installs python 2.7.11.msi so no need to collect python form somewhere to ensure one stop installation of some of requirements.
git comes from https://git-scm.com/ with hopefully no conflicts with above

@OwenBrotherwood
Copy link
Author

OwenBrotherwood commented Feb 17, 2017

Context: Option 1 installation instructions

A COMPLETE new install of windows 10

Gives the dreaded:

npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.
npm WARN Error: EPERM: operation not permitted, scandir 'C:\Users\owen\test\node_modules\usb\node_modules\node-pre-gyp\node_modules\request\node_modules\combined-stream\node_modules'
npm WARN  { Error: EPERM: operation not permitted, scandir 'C:\Users\owen\test\node_modules\usb\node_modules\node-pre-gyp\node_modules\request\node_modules\combined-stream\node_modules'
npm WARN   errno: -4048,
npm WARN   code: 'EPERM',
npm WARN   syscall: 'scandir',
npm WARN   path: 'C:\\Users\\owen\\test\\node_modules\\usb\\node_modules\\node-pre-gyp\\node_modules\\request\\node_modules\\combined-stream\\node_modules' }
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" "-i" "usb"
npm ERR! node v7.5.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE

I test on the same system with an installation of Visual Studio 15 (Community) and hope,

Note:

  • google says disable virus protection, google may or may be right sometimes, but in connection with this case, it did not help.
  • google also says something about npm cache and cleaning: new installation of everything, so no cigar.

Edit
https://github.com/felixrieseberg/windows-build-tools is a possible place for a solution, however it is still possible that https://github.com/nodejs/node-gyp/blob/master/README.md may require adjustment in terms of current state what is "easy" in connection with getting node-gyp to work on windows.
node-usb/node-usb#163 suk

@OwenBrotherwood
Copy link
Author

After a long trail, I have found the following:

  • node-usb, a very important piece of npm dependancy train may have troubles with 7.5.0
  • nw.js is Chromium 56 + Node 7.5.0 and boy do I hate not using same node version
    but,
    "downgraded" to node 6.9.5 LTS and node-usb could compile and hope I don't get problems with nw.js when I get there.

I will try out option 1 as soon as I have energy to remove VS2015 Community and start again.

@joaocgreis
Copy link
Member

@OwenBrotherwood I believe the issue you have is because you install windows-build-tools as Administrator. In fact, any different user account will have the same result. This should be easy to fix: as a user, before running npm init, do

npm config set msvs_version 2015

@felixrieseberg @A92hm would it be simple to add a message at the end of installation with the exact npm config commands to run from other accounts? Or make the module detect already installed tools and just setup npm. Or just make the documentation clearer. Just some ideas, perhaps this is something you can consider. Thanks!

@OwenBrotherwood
Copy link
Author

OwenBrotherwood commented Feb 20, 2017

The administrator issue is in scope: I am examining the docs from different sources and in general, there is no one true answer as various repos take different aproaches.

I have deceided the only true source for option 1 is to start at MS with http://landinghub.visualstudio.com/visual-cpp-build-tools and work the stack from there.

The following, with usage of https://github.com/felixrieseberg/windows-build-tools is an interesting help for some, but I have removed it from my list of options.

Option 1: Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).

Option2 with Option1, is in scope for analysis of best practise/possible most sucessfull in relation to how many click click installations are needed and the hard disk place required

Option 2: Install tools and configuration manually:
Visual C++ Build Environment:
Option 1: Install Visual C++ Build Tools using the Default Install option.
Option 2: Install Visual Studio 2015 (or modify an existing installation) and select Common Tools for Visual C++ during setup. This also works with the free Community and Express for Desktop editions.
💡 [Windows Vista / 7 only] requires .NET Framework 4.5.1
Install Python 2.7 (v3.x.x is not supported), and run npm config set python python2.7 (or see below for further instructions on specifying the proper Python version and path.)

Launch cmd, npm config set msvs_version 2015

In general, I allways prefer to install as non-admin, including node and other tools: I come from a unix background that is "you shouldn't need root all the time"

@OwenBrotherwood
Copy link
Author

In general, it may be a requirement to read thru some docs if one's app really depends on problem free native support.

My current reading is https://msdn.microsoft.com/en-us/library/z7kx322x.aspx with focus on not using Visual Studio.

As previously indicated: very old man from unix background - if you can't do it from the cmd line it ain't worth doing

@bnoordhuis
Copy link
Member

Closing, doesn't seem to be an issue with node-gyp itself. If it's a documentation issue, a pull request would be welcome.

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