node. JS Installation

Source: Internet
Author: User

1. Address:http://nodejs.org/download/ after entering, download the corresponding installation package according to different operating system

2. Run after download.

You can enter node-v and npm-v at the command line

To see if the installation was successful

  

3.NPM (Node Package Manager) Install, update, uninstall package

  

(1) Global mode download, enter command line mode:

    NPM install-g <package name>

After the installation is complete, you will be prompted about where the package is installed and other relevant information.

Can modify the storage path of NPM's global module and the path of the cache

On the command line, enter

        npm config set prefix "f:\test" and npm config set cache "F:\node_cache"

Enter NPM config ls-l to view the current directory settings, which can be configured with the NPM Config Set property Name property value

(2) Local mode download, enter command line mode input:

    NPM Install <package name>

The stored path is the current directory you entered

The install command can be

    NPM Install <package name>@<version spec>

Select the version of the package that you installed, such as

    NPM install [email protected]

    NPM Install the latest version of [email protected] 0.2

    npm Install [email protected]"<0.3" less than 0.3 of the latest version

    npm install =0.1.0<0.3.1 ' >[email protected]">=0.1.0<0.3.1" , etc.

  

  

  

Uninstalling packages

    NPM Uninstall <package name>

Update package

    NPM Update <package name>

Global operations Join the-G flag

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.