7

Configuring Windows 10 (64-bit) for npm and node-gyp

 1 year ago
source link: https://gist.github.com/jtrefry/fd0ea70a89e2c3b7779c
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Configuring Windows 10 (64-bit) for npm and node-gyp · GitHub

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

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK