Home > Web Front-end > Front-end Q&A > What to do if the react project installation fails

What to do if the react project installation fails

藏色散人
Release: 2023-01-04 09:32:44
Original
2264 people have browsed it

Solution to failed installation of react project: 1. Uninstall yarn in the computer application and reinstall it; 2. Use the command line to execute "npm uninstall yarn -g"; 3. Use npm again Just run the command to install the react project.

What to do if the react project installation fails

The operating environment of this tutorial: Windows 10 system, react18.0.0 version, Dell G3 computer.

What should I do if the installation of the react project fails?

How to handle React installation failure

[I have recently started to self-study React, the following are personal study notes for learning and sharing only]

Create a react project, how to install react?

Step 1: We generally use the npm command to install, enter npx create-react-app my-app on the command line, and create a file named my-app Project

## When we

enter such an interface, it means that our project has been successfully started Download and install react.

Step 2: When Happy hacking is successfully displayed, it means we have succeeded! Throw flowers~throw flowers! ! ! ! !

#At this time we can try to enter our project and To start running, enter npm start on the command line, and we will be able to see such an interface in the browser

! ! ! ! ! ! ! ! Here comes the point! ! ! ! ! ! ! ! !

Problem encountered error:

1. When the download progress bar is not a white bar but Such a shape, then it may be that your computer has yarn installed, and it is using yarn to download it to you, and then it downloads the old version of react. There will eventually be some problems with lower versions, and we have to pursue higher versions of react.

#2. If the installation fails, you need to uninstall yarn from your computer application and reinstall it.

#3. If the error still appears, you can choose to use the command line npm uninstall yarn -g

4. Perform the above installation operation again, and you will be successful!

Recommended study: "react video tutorial"

The above is the detailed content of What to do if the react project installation fails. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template