npm installation code example
Example 1: install latest npm
npm install npm@latest -g
Example 2: intall npm
npm install -g npm
Example 3: install npm mac
brew install node
Example 4: install an npm package
npm install package-name
To save as a dependency:
npm install package-name --save
Example 5: npm latest version windows
npm-windows-upgrade --npm-path "C:\nodejs"