Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use node.js Image of NPM to accelerate nvm

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of "how to use NPM's node.js image to accelerate nvm". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to use NPM's node.js image to accelerate nvm" can help you solve the problem.

NVM acceleration

Nvm is usually used to install Node.js.

But after installation, the user experience is not good, due to some immutable reasons, the domestic network is not easy to complain; even the implementation of nvm ls-remote takes a long time.

Of course, the "Tao" is one foot high and the devil is one foot high, and smart Chinese people must have come up with the corresponding solution, that is, to set up a variety of images, such as Taobao source Taobao NPM image.

So the way to speed up nvm is to use NPM Taobao's node.js image.

Interim plan:

Execute the command to set a variable before running the nvm command

NVM_NODEJS_ORG_MIRROR= https://npm.taobao.org/mirrors/node

Then execute the nvm command, and it's very fast; in this case, you have to manually execute the command to set the variable every time you use it, so you have a permanent solution.

Permanent solution:

In fact, it is very simple to add the above command to set variables in .bashrc, so that the system automatically executes the command every time it is turned on.

NPM acceleration

It's also very touching to use npm install speed after installing node; so we also need to use images to speed up dependent installations.

The setup is also relatively simple. You only need to set the global configuration of npm.

# check the default registry address npm config-g get registry https://registry.npmjs.org/# setting npm Taobao image npm config-g set registry https://registry.npm.taobao.org

After setting up in this way, the installation will be very fast.

This is the end of the introduction to "how to use NPM's node.js image to accelerate nvm". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report