Home  >  Article  >  Web Front-end  >  Methods to solve the package management tool NPM and yarn download and installation timeout

Methods to solve the package management tool NPM and yarn download and installation timeout

青灯夜游
青灯夜游forward
2020-08-19 10:25:333480browse

Methods to solve the package management tool NPM and yarn download and installation timeout

npm Set Taobao mirror address

npm install -g cnpm --registry=https://registry.npm.taobao.org
npm config set registry https://registry.npm.taobao.org

In this way, the npm command can be replaced by the cnpm command, such as when using the react scaffolding command A timeout error will be reported when create-react-app, this setting can solve the problem. [Video tutorial recommendation: nodejs video tutorial]

yarn Set Taobao mirror address

yarn config set registry https://registry.npm.taobao.org

Using the react scaffolding commandcreate-react -Timeout error reported when app:
There appears to be trouble with your network connection. Retrying…

It can be solved after the setting is completed.

For more programming-related knowledge, please visit: Introduction to Programming! !

The above is the detailed content of Methods to solve the package management tool NPM and yarn download and installation timeout. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:learnku.com. If there is any infringement, please contact admin@php.cn delete