简体   繁体   English

接下来运行 dev 编译成功,但是 localhost 没有加载

[英]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_modulespackage-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.

相关问题 Next dev 成功运行,但继续在浏览器上加载 - Next dev successfully runs, but keeps loading on browser 为什么“npm run dev”锁定next.js中的“ready on localhost”? - Why "npm run dev" locks on "ready on localhost" in next.js? “npm run dev”有效,但“next dev”无效 - "npm run dev" works, but "next dev" does not 即使成功编译后,Webpack也不会在本地主机中加载输出文件 - Webpack not loading output files in localhost even after compiling successfully next.js 代码在运行开发中工作,但不运行构建 - next.js code works in run dev but not run build React 编译成功但未显示组件 - React compiled successfully but not showing components 如何在 chrome dev 远程设备上运行 React.js localhost 应用程序? - How to run React.js localhost application on chrome dev remote devices? http://localhost:8000/ 没有显示任何组件,即使我运行了 npm 开发运行 - http://localhost:8000/ is not showing any components even though I ran npm dev run 当我运行 npm dev 时,它同时打开不包含我的项目的 localhost 3000 - when i run npm dev which is concurrently opens localhost 3000 which does not contain my project ChunkLoadError:加载块 node_modules_next_dist_client_dev_noop_js 失败 - ChunkLoadError: Loading chunk node_modules_next_dist_client_dev_noop_js failed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM