Skip to content

Instantly share code, notes, and snippets.

@nolanlawson
Last active December 28, 2018 22:24
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save nolanlawson/566a36b83504daac246d2dddfc01787f to your computer and use it in GitHub Desktop.
Save nolanlawson/566a36b83504daac246d2dddfc01787f to your computer and use it in GitHub Desktop.
Git/Bash/Node/npm on Windows

Git/Bash/Node/npm on Windows

Update: there's an easier way to do this. Check out my new gist instead.

How I set up my Windows 10 machine for Node development. Time to complete: about 2 hours on a fast connection.

Requirements

  • Bash, not Windows shell
  • Git
  • Node/npm
  • nvm or equivalent (need to be able to switch Node versions easily)

Steps

  1. Download cmder
  2. Download Nodist
  3. Download Python, get 2.x instead of 3.x
  4. Modify your global environment variable to have ;C:\Python27\;C:\Python27\Scripts at the end
  5. Download Windows SDK for Windows 8.1
  6. Download Visual Studio, install and set it up, choose "custom" and check the "Common Tools for Visual C++ 2015" option, under "Programming Languages" > "Visual C++" (DO NOT SKIP THIS STEP). Edit from @mattpodwysocki: you should be able to get by with just Visual C++ standalone.

Make sure it works

mkdir test
cd test
npm init -y
npm install --save leveldown sqlite3 phantomjs-prebuilt browserify watchify webpack react

The above will install a bunch of popular modules, including a few native ones. If anything fails, you'll know.

Gotchas

  • Don't skip "Visual C++" when installing Visual Studio.
  • Restart Cmder after you change anything, or you might not see the changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment