Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configuring Windows 10 (64-bit) for npm and node-gyp
  • Install Git for Windows
  • Install Node
  • Install Python 2.7.3
  • Install Microsoft Visual Studio 2015 Community
  • Open the command prompt as Administrator, run the following commands, then close the command prompt (a new prompt is required before the new environment variables will be available)
    • npm install -g npm
      • (Upgrades to npm v3, which no longer nests dependencies indefinitely. No more "maximum path length exceeded" errors due to the 260 character path limit in Windows, or needing to delete node_modules with rimraf.)
    • setx PYTHON C:\Python27\python.exe /m
      • (May need to change path to your custom install directory.)
  • Open a new command prompt and run the following commands. If these install without errors, you have bypassed one of the most frustrating experiences for npm users on Windows.
    • npm install -g node-gyp
    • npm install -g socket.io
@archiej

This comment has been minimized.

Copy link

archiej commented Mar 29, 2016

Thanks! This really helped for setting up my windows dev environment on my mac.

@jdpigeon

This comment has been minimized.

Copy link

jdpigeon commented Jun 20, 2018

Magnificent

@Dillenger69

This comment has been minimized.

Copy link

Dillenger69 commented Jun 29, 2018

Holy Crap! Thank YOU!!! I've been trying to get this to work for three days now, installing various MS SDKs and Visual studio versions. The ONLY thing that worked were the steps above with Microsoft Visual Studio 2015 Community. Someone should really address this as it seems to have been a problem for years and it will only get worse once that link above starts to fail.

@paulappwork

This comment has been minimized.

Copy link

paulappwork commented Apr 2, 2019

THANK YOU SO MUCH. IT helped me out a lot as well!

@Calderis

This comment has been minimized.

Copy link

Calderis commented May 17, 2019

Thanks a lot! Always a pain in the ass to configure this. It once took me a full week to do this!

@mje2

This comment has been minimized.

Copy link

mje2 commented Jun 22, 2019

Had a lot of trouble with this because I was trying to use the latest version of Python 3.7.3 - using 2.7.3 instead and everything worked. Windows 10 with Visual Studio 2019 Community

@AsherJacob

This comment has been minimized.

Copy link

AsherJacob commented Jul 18, 2019

i spent an entire day trying to configure this and i was really going crazy. Thanks a ton Mr.

@CyanoFresh

This comment has been minimized.

Copy link

CyanoFresh commented Jul 18, 2019

don't know what exact step helped but it's working now. thanks

@manuelxtrem

This comment has been minimized.

Copy link

manuelxtrem commented Jul 20, 2019

This solution came at the right time! I have been struggling with it for days. Thanks a lot

@astroame

This comment has been minimized.

Copy link

astroame commented Sep 9, 2019

Please can I use Microsoft Visual Studio 2015 as a replacement for Microsoft Visual Studio 2015 Community?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.