Skip to content Skip to sidebar Skip to footer

Aurelia Npm Install: Tons Of "gyp Err"

These types of questions are a dime a dozen, and I've gone through resource after resource but nothing seems to work: https://github.com/nodejs/node-gyp/issues/629 NodeJS - Error

Solution 1:

I really, truly don't like answering my own questions, but I was able to resolve this by taking the following steps:

  1. Uninstall Node.js
  2. Uninstall Microsoft Visual Studio 2012
  3. Uninstall any remaining C++ 2010 x86/x64 redistributables
  4. Reinstall Node.js
  5. Use Node.js to reinstall npm
  6. Install Microsoft Studio 2013 (Express Desktop)

At this point, I should have been able to run npm install against the Aurelia directory, however I was still failing due to the error noted in the description of the issue.

  1. Explicitly tell npm to use Microsoft Studio 2013, by issuing the command:

    npm config set msvs_version 2013 --global
  2. Now, subsequent to this command, I was able to successfully execute npm install without any GYP errors.

I don't know why, but for whatever reason node-gyp doesn't seem to play nice with 2012, so if you're hitting this issue, I'd opt for 2013, which is actually referenced here: https://github.com/nodejs/node-gyp

Solution 2:

I'm on windows and relatively new to the node-style front-end tooling. I feel your pain.

The node gyp ERR! messages are safe to ignore. If you look closely they're always followed by npm WARN optional dep failed, continuing [some dependency]

Here's an example of one of the many gyp ERR! blocks you'll have the pleasure of seeing when npm installing using windows:

C:\repos\skeleton-navigation\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node
_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp
 else (node  rebuild ) s\node-gyp\bin\node-gyp.js" rebuild -)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (C:\ProgramFiles\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:114:14)
gyp ERR! stack     at C:\ProgramFiles\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:69:11
gyp ERR! stack     at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
gyp ERR! SystemWindows_NT6.3.9600
gyp ERR! command "node""C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js""rebuild"
gyp ERR! cwd C:\repos\skeleton-navigation\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.i
o-client\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARNoptional dep failed, continuing utf-8-validate@1.2.1

Solution 3:

If you have Visual Studio 2015 Community with C++ section checked, or Visual Studio 2015 Express for Desktop it will put in the right bits.

If you need minimal install for VM or just not using those tools on Windows 10 x64:

1 - Python

Install latest Python 2.7.x, not 3.x. You don't have to select option to add to PATH unless you need Python for some other tool.

2 - Microsoft Visual C++ Build Tools 2015 Technical Preview

Don't do default install, you need to select both Win8.1 and Win 10 SDKs. This is referencing download posted 11/20/2015.

Microsoft Visual C++ Build Tools 2015 Technical Preview

3 - nodejs

Tested with stable branch 5.3.0, add following globals for node-gyp.

npm --global config set msvs_version 2015

npm --global config set python c:\dev\Python27\python.exe

(or wherever you installed python, only needed if you didn't add to PATH via installer)

That's it.

git clone https ://github.com/aurelia/skeleton-navigation

cd skeleton-navigation

npm install

Post a Comment for "Aurelia Npm Install: Tons Of "gyp Err""