Yarn 2: 404 page does not load
See original GitHub issueBug report
Describe the bug
When running next using Yarn 2 and visiting a page in the browser that doesn’t exist, the 404 error page never shows up. Instead it loads forever (“waiting on localhost…”) and then eventually errors with ERR_EMPTY_RESPONSE
.
But the terminal shows that the page was compiled:
[ event ] build page: /next/dist/pages/_error
[ wait ] compiling ...
[ ready ] compiled successfully - ready on http://localhost:3000
To Reproduce
I added a repro here – simply clone and run
npm start
, dependencies and yarn itself are included
In the terminal:
> mkdir repro
> cd repro
> yarn init -i 2
> yarn add next react react-dom
> mkdir pages
> yarn next
Then open localhost:3000 in the browser.
Expected behavior
The browser receives a response and the 404 page is shown.
System information
- OS: Windows 10 and Ubuntu 16.04 (within Windows Subsystem for Linux 2)
- Browser (if applies): Edge 80, probably all others too
- Version of Next.js: 9.3.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
yarn install throw error request failed \"404 Not found"
I found a solution yarn config set registry https://registry.npmjs.org rm yarn.lock yarn.
Read more >Several Yarn links lead to incorrect urls or 404 not found error ...
Cause. The link rules are not correctly configured or some rules are missing in the Yarn configuration file, rewrite.xml. Answer.
Read more >Troubleshooting | Yarn
This error simply means that the specified package is requiring something without explicitly declaring it in its dependencies. Since this behavior is unsafe ......
Read more >Yarn publish does not work (#121668) · Issues - GitLab
A yarn publish fails with a 404 when attempting to publish a package to the NPM registry. This looks it may be more...
Read more >yarn install - Package not found - Visual Studio Feedback
info If you think this is a bug, please open a bug report with the information provided in "/home/vsts/work/1/s/yarn-error.log". info Visit ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is still an issue on Next
v.11
. This should be re-opened.I’m currently still facing this issue on Next 10.0.8