【问题标题】:Localhost:3000 is not working properly in windows while creating a reactjs app with CRA使用 CRA 创建 reactjs 应用程序时,Localhost:3000 在 Windows 中无法正常工作
【发布时间】:2020-06-15 05:49:45
【问题描述】:

有几点,在过去的几天里,我试图找出问题,但我被卡住了。

  1. 我试图用

    停止 localhost:3000

    netstat -ano |发现str:3000 taskkill /PID myPIDhere /F

但是,我得到了-

TCP    0.0.0.0:3000           0.0.0.0:0              LISTENING       5748

它说 - 错误:PID 5748 的进程无法终止。 原因:没有正在运行的任务实例。

  1. 当我访问 localhost:3000 时,它仍然试图一次又一次地加载。
  2. 每当我尝试使用 CRA 创建 reactjs 应用时,终端都会永远挂在那里。
  3. 在 creatjs 应用中安装 NPM 也是如此。

【问题讨论】:

  • 你试过reboot

标签: javascript reactjs windows vue.js localhost


【解决方案1】:

编辑 2:netstat -ano | findstr :3000 tskill typeyourPIDhere

在 windows cmd 中使用 tskill 与在 git-bash 上使用 taskkill

编辑:试试wmic process where name="[process name]" call terminate / delete

别想了,试试把 CRA 端口换成别的吧?

https://scriptverse.academy/tutorials/reactjs-change-port-number.html

尝试其中一种方法,看看它们是否至少可以帮助您运行 CRA。

【讨论】:

  • 现在试试
  • 我读过的奇怪的事情是重启你的电脑!?我相信你会尝试过的。关闭等待并重新打开电源。但这不是合乎逻辑的解决方案。
  • 更改端口和wmic 终止/删除进程?
  • 不知道你是否收到了编辑通知netstat -ano | findstr :3000 后跟tskill typeyourPIDhere 在 Windows 命令提示符中而不是在 Git-Bash 中
猜你喜欢
  • 2020-04-14
  • 1970-01-01
  • 1970-01-01
  • 2019-05-05
  • 2014-06-22
  • 2020-03-23
  • 2021-11-03
  • 1970-01-01
  • 2019-06-22
相关资源
最近更新 更多