- Download Git for Windows Portable (Comes with Git Bash included)
- Download Node with npm
- Create Applications folder in C: drive so that you have the proper permissions
C:\Applications
- Install Git for Windows inside of Applications directory
C:\Applications\Git
- Install Node inside of Applications directory
C:\Applications\nodejs
Applications
├─ Git
│ ├─ git_bash.exe
│ └─ etc
│ ├─ profile (edited)
│ └─ node_env.conf
└─ nodejs
├─ node
└─ npm
- List the content of the Applications directory
ls /c/Applications
- Type this export command into Git Bash
export PATH=$PATH:/c/Applications/nodejs
- To check that the path was exported type
node --version
andnpm --version
- The version numbers should display in the terminal
- If they do not display, check that npm and node.exe are actually located inside of
C:\Applications\nodejs
- Create a custom config file in
C:\Applications\Git\etc\node_env.conf
# Include nodejs PATH
PATH=$PATH:/c/Applications/nodejs
- Edit the Git Bash Profile
C:\Applications\Git\etc\profile
- Add
source "etc/node_env.conf"
to the space right before theEXPORT PATH
line - You should now be able to use npm and Node from Git Bash
- To use this new Git Bash configuration with the VS Code integrated terminal you need to change the terminal path in the settings.json
- In VS Code open file
- Hover over preferences
- Click settings
- Add the following code to the
settings.json
file inside the curly braces
"terminal.integrated.shell.windows": "C:\\Applications\\Git\\bin\\bash.exe",
- Save the file and reload VS Code
- Check Node and NPM versions inside the integrated terminal