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.