"start": "set PORT=3000&&roadhog server","build": "roadhog build","lint":...}"."/> "start": "set PORT=3000&&roadhog server","build": "roadhog build","lint":...}".">

Home >Web Front-end >Front-end Q&A >What should I do if react is stuck and cannot move?

What should I do if react is stuck and cannot move?

藏色散人
藏色散人Original
2022-12-27 10:07:162711browse

Solution to the problem that react is stuck and cannot move: 1. Check whether port 3000 is occupied. If it is occupied, kill the process; 2. Directly change the start configuration of the "package.json" file to ""scripts ": {"start": "set PORT=3000&&roadhog server","build": "roadhog build","lint":...}".

What should I do if react is stuck and cannot move?

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

What should I do if react is stuck and cannot be moved?

The progress of the react project is stuck. Would you like to run the app on another port instead?

When running the dva project, the port may be occupied, and then it will The following prompt appears:

What should I do if react is stuck and cannot move?

After entering y, the progress of the project startup will be stuck. In this case, generally in addition to checking the occupancy of port 3000 and then killing the process, the front-end is the most The common way to deal with it is to directly change the start configuration of the package.json file:

"scripts": {<!-- -->
    "start": "set PORT=3000&&roadhog server",
    "build": "roadhog build",
    "lint": "eslint --ext .js src test",
    "precommit": "npm run lint"
  },

and then restart it.

Recommended learning: "react video tutorial"

The above is the detailed content of What should I do if react is stuck and cannot move?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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