Select Your OS:
- A 32-bit or 64-bit computer with at least 8GB of RAM. 16GB or more is recommended.
- At least 16GB of free disk space.
The following guide will install NodeJS to your local machine. This is the preferred way as some applications don't play nice with Node Version Manager. However, if you need multiple versions of NodeJS running on your computer and you need to switch back and forth, skip to the next section. Don't install both NodeJs and Node Version Manger. Choose one of the paths.
```bash sudo apt-get install python-software-properties curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install nodejs node -v v6.11.3 npm -v v3.10.10 ```
```bash # Run NVM installer curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | bash wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.4/install.sh | bash ```
Install Homebrew from https://brew.sh/.
```bash # Install brew update brew install nvm mkdir ~/.nvm # Update bash_profile nano ~/.bash_profile # Copy and paste the following export NVM_DIR=~/.nvm source $(brew --prefix nvm)/nvm.sh # After you save and close bash_profile, run the following source ~/.bash_profile echo $NVM_DIR ```
# Install current nodejs nvm install v6.11.3 nvm alias default v6.11.3 # Upgrade nvm reinstall-packages v8.5.0 # Check which versions are install nvm ls # Deleting old versions nvm uninstall v6.11.3 nvm uninstall v8.5.0
Test your NodeJS installation by typing
node in your shell/terminal and hitting enter. If everything was installed successfully, you'll enter a NodeJS session and have the ability to execute python code.
> 1 + 2 3 >
Ctrl+D to exit the NodeJS REPL.