How to Install Node.js and NPM on a Mac ¶
Install node with homebrew:
brew install node
To see if Node is installed:
node -v v10.12.0
To see if NPM is installed:
npm -v 6.4.1
How to Update Node and NPM
brew update brew upgrade node
How to Uninstall Node and NPM
brew uninstall node
Downgrading Node/NPM
To install a specific NodeJS version with brew, see:
https://medium.com/@katopz/how-to-install-specific-nodejs-version-c6e1cec8aa11
To install a specific NPM version in case NPM is already installed (meaning, to upgrade or downgrade the installed NPM version) you can use NPM itself !
# install a specific NPM version, # with the `-g` / `--global` flag to replace the previously installed version npm install -g npm@4
See: https://discuss.bitrise.io/t/how-to-install-a-upgrade-downgrade-npm-to-a-specific-version/3381
How to use
Then in your project you can finally populate node_modules from package.json as follows:
npm install
How to Install Sass compiler on a Mac
Check if ruby is available:
ruby -v
If not, install it:
brew install ruby
Install Sass:
sudo gem install sass
In case of SSL error "SSL Error When installing rubygems, Unable to pull data from 'https://rubygems.org/", try this:
sudo gem sources -r https://rubygems.org sudo gem sources -a http://rubygems.org
the again:
sudo gem install sass
Eventuale aggiornamento dei requirements:
pip install -r requirements/development.txt