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

Windows 10 , Installing Native Modules, Option 1 Complains about missing v110 build tools #48

Closed
airtonix opened this issue Jan 24, 2016 · 5 comments

Comments

@airtonix
Copy link

On a machine with windows 10 and follow option 1 environment setup method:

  1. nodist v4.2.4
  2. cinst python2
  3. npm config set python python # since python == c:\tools\python2\python.exe
  4. cinst microsoft-build-tools
  5. npm config set msvs_version 2015 --global
  6. npm install bufferutil

Results in :

$ npm i bufferutil

> bufferutil@1.2.1 install C:\Users\airtonix\projects\test\node_modules\bufferutil
> node-gyp rebuild


C:\Users\airtonix\projects\test\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\Nodist\bin\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\Microsoft.Cpp.Platform.targets(54,5): error MSB8020: The build tools for Visua
l Studio 2012 (Platform Toolset = 'v110') cannot be found. To build using the v110 build tools, please install Visual Studio 2012 bui
ld tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solutio
n, and then selecting "Retarget solution". [C:\Users\airtonix\projects\test\node_modules\bufferutil\build\bufferutil.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 (x86)\Nodist\bin\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.10586
gyp ERR! command "C:\\Program Files (x86)\\Nodist\\v-x64\\nodev4.2.4\\node.exe" "C:\\Program Files (x86)\\Nodist\\bin\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\airtonix\projects\test\node_modules\bufferutil
gyp ERR! node -v v4.2.4
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v-x64\\nodev4.2.4\\node.exe" "C:\\Program Files (x86)\\Nodist\\bin\\node_modules\\npm\\bin\\npm-cli.js" "i" "bufferutil"
npm ERR! node v4.2.4
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! bufferutil@1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bufferutil@1.2.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bufferutil 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 information on how to open an issue for this project with:
npm ERR!     npm bugs bufferutil
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bufferutil
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\airtonix\projects\test\npm-debug.log
@mousetraps
Copy link
Contributor

The error message is complaining about VS 2012 build tools. Did you run npm config set msvs_version 2015?

@airtonix
Copy link
Author

@mousetraps updated origin post, short answer, yes i did.

@mousetraps I noticed that while looking for more information back here on the node-gyp build problem thread, that you mention some more details about installing the c++ build tools:

  • option 1 build tools neglect to mention ticking both windows 8 and 10 options. (i only ticked windows 8 option).

@mousetraps
Copy link
Contributor

Thanks, fixed in #49. The change in instructions was a recent development (nodejs/node-gyp#629 (comment)) to account for a change in behavior in C++ Build Tools CTP2 and I hadn't gotten the chance to updated it here yet.

Does everything work when you follow these updated instructions?

@airtonix
Copy link
Author

@mousetraps yes but :

  1. after cinst microsoft-build-tools you have to restart. Spending most of my life in linux caught me out on this critical step.
  2. npm config set msvs_version 2015 --global doesn't seem to have any affect, while npm config set msvs_version 2015 does. I guess we'll still be using the preinstall field of our projects for a while yet,

edit: point two is probably not important since i already had msvs_version in my node version specific npmrc so the global file was being ignored (possibly something to do with how nodist manages things)

@mousetraps
Copy link
Contributor

@airtonix interesting... works for me. regarding the global flag, it won't have an effect if you've already set it locally - can you verify that npm config get msvs_version is not set?

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

2 participants