Use Taobao NPM mirror

NPM common commands
NPM provides many commands, such as install and publish, use npm help to view all commands.
Use npm help <command> to view detailed help for a command, such as npm help install.
Use npm install . -g in the directory where package.json is located to install the current command line program locally, which can be used for local testing before release.
Use npm update <package> to update the corresponding module in the node_modules subdirectory of the current directory to the latest version.
Use npm update <package> -g to update the corresponding command-line program installed globally to the latest version.
Use npm cache clear to clear the NPM local cache, which is used to deal with people releasing new versions of code with the same version number.
Use npm unpublish <package>@<version> to unpublish a version of code that you have published.
Using Taobao NPM Mirror
Everyone knows that it is very slow to directly use the official npm mirror in China. It is recommended to use Taobao NPM mirror here.
Taobao NPM mirror is a complete npmjs.org mirror, you can use this instead of the official version (read-only). The synchronization frequency is currently every 10 minutes to ensure that it is synchronized with the official service as much as possible.
You can use Taobao's customized cnpm (gzip compression support) command line tool instead of the default npm:
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
Then you can use the cnpm command to install modules now:
$ cnpm install [name]

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326356608&siteId=291194637