Nodejs Installation
node. JS officially provides a MAC OS X installation package, you can find the download link in http://nodejs.org, and then select Macintosh Installer to download the installation package. Run the installation package when the download is complete and follow the prompts to complete the installation
node. js and NPM are installed in the/usr/local/bin directory, which requires system administrator rights during installation
After success you can run the node command in the terminal to enter node. JS Interactive mode. If-bash:node:command not found is present, it does not install correctly, you need to rerun the installation package or take other forms to install node. js
Install Node Package Manager
Node Package Manager (NPM) is a third-party package management tool provided by node. js, just like PHP Pear, Python's PyPI. NPM is a fully JavaScript-implemented command-line tool that executes through node. js, so strictly speaking it is not part of node. js. In the initial release, we needed to install NPM manually after node. JS was installed. However, starting with node. JS 0.6, NPM is already included in the release package, and when we install packages and source packages on Windows and Macs, NPM is installed automatically at the same time
After the installation is complete, you can perform npm-v to see the installed version
Installing the multi-version manager
Node version Manager (node version MANAGER,NVM) is a generic term that has many different implementations. Usually we say that NVM refers to HTTPS://GITHUB.COM/CREATIONIX/NVM or https://github.com/visionmedia/n. I recommend the use of visionmedia/n according to personal preference
N is a very concise Node multiple version manager, even its name is no exception. Its name is n, yes, just one letter
NPM install-g n command to install n
Attention:
n does not support Windows
Using n--help in the shell to see the description
Install node. js on Mac OS x