[英]Next run dev compiled successfully, but localhost is not loading
When I run npm run dev
.当我运行
npm run dev
。 out of the blue, localhost just loads forever.出乎意料的是,本地主机只是永远加载。 The response is below in image 1:
响应如下图 1 所示:
I thought it was some sort of change I made, but I exhausted myself looking for a change that could have caused it.我以为这是我所做的某种改变,但我精疲力尽地寻找可能导致它的改变。 I then duplicated my repo from Github (in which localhost worked fine), manually added all my changes to the duplicate, and then deleted all the changes on my original repo.
然后我从 Github 复制了我的回购协议(其中 localhost 工作正常),手动将我所有的更改添加到副本中,然后删除了我原始回购协议中的所有更改。 I then added the changes one-by-one back to the original from the duplicate.
然后,我将更改从副本中逐一添加回原件。
Since then, everything was working fine.从那时起,一切正常。 But today, I pushed changes to Github, and renamed my root folder, and immediately after, the stalled response has come back.
但是今天,我将更改推送到 Github,并重命名了我的根文件夹,紧接着,停滞的响应又回来了。 No code changes caused this, and it's definitely not that I renamed the folder, because it happened yesterday before I renamed anything.
没有代码更改导致这个,而且绝对不是我重命名文件夹,因为它发生在昨天我重命名任何东西之前。
I think it must be a Next issue, but I can't be sure.我认为这一定是下一期,但我不能确定。 I have deleted the
.next
folder, node_modules
, and package-lock.json
, and reinstalled, but that has not worked.我删除了
.next
文件夹、 node_modules
和package-lock.json
,并重新安装,但没有用。 I've also restarted VSCode and my computer.我还重新启动了 VSCode 和我的电脑。
Next has run and compiled successfully (as image 2 shows). Next 已成功运行并编译(如图 2 所示)。
The problem was I had installed @apollo/client version 3.5.6, which for some reason was breaking everything.问题是我安装了@apollo/client 3.5.6 版,由于某种原因它破坏了一切。 I downgraded to 3.4.0, and it's working again.
我降级到 3.4.0,它又可以工作了。 Thanks, GH commit history.
谢谢,GH 提交历史。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.