Yarn. lock was updated a few days ago while working on a dependency package for an old project, and a strange thing happened

The address of the source became registry.npmmirror.com

I went to make sure that there was no problem with my source, which is still familiar with the registry.npm.taobao.org

Could it be that my network has been hijacked?

There is not much discussion about this on the Internet. In fact, Taobao is going to change the server of Taobao NPM source in order to provide more stable, safer and more in line with the requirements of national laws and regulations. And the old domains npm.taobao.org and registry.npm.taobao.org will no longer be used

As of 0:00 May 31, 2022, these two old domains will be out of service. As of now, installing the NPM package through the old domain has been 301 to the new domain name registry.npmmirror.com, which is what HAPPENED to me

Ali Technology said in the article

Please update the old domain name to the new one as soon as possible. Enterprise users may also need to contact network management /IT/SRE to update the firewall whitelist. Of course, if you are using CNPM CLI tools, we will replace all of them and release the new version, you just need to reinstall to the minimum version.

Possible effects and handling methods

1. Enterprise users need to contact esight /IT/SRE to update the firewall whitelist.

2. For THE CLI of CNPM itself, we will send patch for each major version to update, and developers can reinstall it.

3. Tools such as NRM require PR to update the built-in domain name.

4. Some of the tools packaged by the developers themselves, such as egg-init, need to be updated by the maintainer.

5. Developers need to execute sed and other commands to replace or regenerate existing lock files.

6. The registry address in the local NPMRC needs to be updated by the developer (if any).

7. Platform applications written dead, developers need to update and deploy.

In fact, the impact of this gadget is not big, it is estimated that the development of NPM I error?

Taobao NPM mirror switch new domain name — Ali technology