react项目运行出现进度卡住,Would you like to run the app on another port instead?

Posted 头名字W

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了react项目运行出现进度卡住,Would you like to run the app on another port instead?相关的知识,希望对你有一定的参考价值。

在运行dva项目时可能出现端口被占用的情况,然后会出现如下提示:

然后输入y后,项目启动的进度会卡住,这种情况一般除了查看3000端口的占用情况然后杀掉进程,前端最常用的处理的办法是直接改下package.json文件的start的配置:

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

然后重启下就行了。

以上是关于react项目运行出现进度卡住,Would you like to run the app on another port instead?的主要内容,如果未能解决你的问题,请参考以下文章

react-native metro bundle卡住并且没有运行进度条

在R中安装软件包时出现Would you like to use a personal library instead

would you please...could you please...两句区别是什么?

Would Your Work Habits Change if You Were Paid by the Job?

Why Would you Cross the Pacific on a Wooden Raft?

How would you differentiate JDK, JRE, JVM, and JIT?