Nodejs NPM Package Management Common Command Introduction

Source: Internet
Author: User

1. Enter NPM config ls-l to view the current settings

2, for a certain setting, you can use the following way:

NPM Config Set property Name property value

EG:NPM config set prefix "C:\123\"

3, read a certain configuration, you can use the following way:

NPM Config Get property name

eg:npm config get prefix

4. NPM Common commands:

Npm-v: View the version of NPM installation
NPM Help XXX viewing assistance
NPM Install XXX Installation module
NPM install [email protected] installation 1.1.1 version of XXX
NPM Install Xxx-g installs the module in the global environment.
NPM LS view installed modules and dependencies
NPM LS-G View the globally installed modules and dependencies
NPM Uninstall xxx (-g) Unload module
NPM Cache Clean Cleanup caching
NPM View moudlename dependencies viewing package dependencies
NPM view Modulenames Viewing the Package.json folder of the node module
NPM View ModuleName labelname View the contents of a tag under the Package.json folder
NPM View ModuleName Repository.url Viewing the source file address of a package
NPM View ModuleName Engines View the version of node that the package depends on
NPM Help Folders view all the folders used by NPM
NPM rebuild ModuleName used to change package content after rebuilding
NPM outdated check if the package is obsolete, this command lists all the obsolete packages that can be updated in a timely manner
NPM update ModuleName Updating the node module
NPM root View the installation path for the current package
NPM root-g View the installation path for a global package
NPM init will guide you through the creation of a Package.json file, including name, version, author information, etc.
When NPM search PackageName releases a NPM package, it needs to verify that a package name already exists.

Nodejs NPM Package Management Common Command Introduction

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.