NPM:

NPM, Node Package Manager, is the Package management tool for the JavaScript world and the default Package management tool for the Node.js platform. NPM allows you to install, share, distribute code, and manage project dependencies.

Common commands:

NPM install Installs the module

NPM uninstall Uninstalls modules

NPM update Updates the module

NPM outdated checks whether the module is outdated

NPM ls View the installed modules

NPM init bootstrapping creates a package.json file in your project

NPM help Displays the detailed help information about a command

NPM root View the installation path of the package

NPM config Manages the NPM configuration path

NPM cache Indicates the cache of the management module

NPM start Starts the module

NPM stop Stops the module

NPM restart Restarts the module

NPM test Tests the module

NPM version Displays the module version

NPM view Displays module registration information

NPM adduser Login

NPM publish publish module

NPM Access sets access levels on published packages

Syntax for NPM package.json

NVM:

Sometimes during development, there are requirements for the node version, and sometimes you need to switch to the specified node version to reproduce problems, etc. When faced with this requirement, we need to be able to switch node versions flexibly. NVM was created to solve this problem by making it easy to switch between multiple Node versions on the same device

Common commands

NPM install -g NRM //

Install v6.2.0, NVM install v6.2.0, NVM install 6.2

NVM uninstall ## Deletes the specified version that has been installed. The syntax is similar to install

NVM use ## Switch to using the specified version of Node

NVM ls ## lists all installed versions

NVM current ## Displays the current version

NRM:

NRM (NPM Registry Manager) is an NPM resource manager that allows you to quickly switch NPM sources

Common commands:

NPM install -g NRM NRM installation

NRM ls lists the available sources

NRM use Taobao to select the source of Taobao in China

NRM test Indicates the NPM test speed

NRM add Taobao http://xxx,xxx Add source

NRM del Taobao deletes the corresponding source

NPX:

A command (NPX) introduced in NPM v5.2.0 that will execute the binary files in the dependency package for you. The purpose of introducing this command is to improve the developer experience with the command line tools provided with the package. Install a parcel globally, but sometimes different projects use different versions, and global packages are not allowed, so consider the following options. Using NPM scripts, add a script to package.json to add the executable directory for node_modules to PATH. Specify an executable command path. When we execute NPX parcel index.html, it automatically searches for./node_modules/.bin.

CNPM:

NPM installation plug-in is downloaded from a foreign server, which is greatly affected by the network and may be abnormal, so we are willing to share taobao team to do this. From the official website: “This is a full npmjs.org image, which you can use instead of the official version (read only, you can’t publish your own package or register users). The sync frequency is currently 10 minutes to ensure that you are as synchronized as possible with the official service.