Create-react-app slow project construction solution,

Source: Internet
Author: User

Create-react-app slow project construction solution,

Slow create-react-app Solution

When operating the Create React App on an official instance, run the following command:

Create-react-app my-app

Create a new React application. For some reason, when pulling various resources, it is often very slow and stuck in

FetchMetadata: sill mapToRegistry uri http://registry.npmjs.org/whatwg-fetch.

The solution is to change the source. Although cnpm is usually used to replace npm, it only uses new commands, however, if you want to modify the registry for the create-react-app-related configuration, you will find that the create-react-app command calls npm by default, therefore, you can set the npm register permanently, so that cnpm or npm is the same.

Npm config set registry https://registry.npm.taobao.org -- After configuration, you can verify whether npm config get registry is successful in the following way -- or npm info express

After the setting is successful, execute create-react-app my-app.

Happy hacking

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.