简体   繁体   中英

Next run dev compiled successfully, but localhost is not loading

When I run npm run dev . out of the blue, localhost just loads forever. The response is below in image 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. 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. 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. I've also restarted VSCode and my computer.

Next has run and compiled successfully (as image 2 shows).

在此处输入图像描述

The problem was I had installed @apollo/client version 3.5.6, which for some reason was breaking everything. I downgraded to 3.4.0, and it's working again. Thanks, GH commit history.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM