Install node. js on Mac OS x

Source: Internet
Author: User
Tags install node

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.