Use Alibaba Cloud Npm Image Acceleration

1. What is npm ?
Npm (node package manager) is a package management tool installed with NodeJS, which can solve many problems in NodeJS code deployment. The common usage scenarios are as follows:
Allow users to download from the NPM server written by others Third-party packages are used locally.
Allows users to download and install command-line programs written by others from the NPM server for local use.
Allows users to upload their own packages or command-line programs to the NPM server for others to use.
Since the new version of node js has integrated npm, npm was also installed before. You can also test for a successful installation by typing " npm -v". The command is as follows, a version prompt appears to indicate that the installation is successful
. Npm can be understood as a command-line tool. Its mission is to help you automatically install the development package that the project depends on.
Composer is the PHP package dependency management tool, and the node.js package management tool is npm. It can be understood like this.
http://registry.npmjs.org is npm The default development package repository, in the npm command-line tool, we can specify to use a different repository. http://registry.npmjs.org is the official repository. Other warehouses are regularly synchronized with the official warehouse. That is to say, there is a certain delay if switching to other warehouse code packages. However, the download speed of switching to a domestic mirror source package will be very fast. The process of installing plug-ins with npm: Download the corresponding plug-in package from http://registry.npmjs.org (the website server is located abroad, so the download is often slow or abnormal)
Alibaba Cloud official mirror site: https://developer.aliyun.com /mirror/
2. View npm source address settings: (default official mirror address)
npm config get registry
https://registry.npmjs.org/
3. Configure Alibaba mirror address: (recommended, fast enough speed, fast
Synchronization frequency, stable) Aliyun
official mirror site: https://developer.aliyun.com/mirror/
Npm Aliyun address:
http://www.npmmirror.com
npm config set registry https://registry.npmmirror.com
Original Taobao npm Domain name resolution is about to stop, just like in "Taobao NPM mirror site calls you to switch new domain name" As announced in: http://npm.taobao.org and http://registry.npm.taobao.org It will officially go offline and stop DNS resolution on 2022.06.30. Domain name switching rules:
http://npm.taobao.org => http://npmmirror.com
http://registry.npm.taobao.org => http://registry.npmmirror.com
4. If you need to unmirror and restore to the official source, please execute the following command:
Npm config set registry https://registry.npmjs.org

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00