If you leave the Next.js app open in Chrome, you will get a "/ _next / webpack-hmr" Routing error in the Rails app.

problem

When I started the local server with rails s, I got the error No route matches [GET] "/ _next / webpack-hmr" every 20 seconds.

It was working normally until a day ago, so when I googled while thinking that it was strange, such an issue was on GitHub. ActionController::RoutingError (No route matches [GET] "/_next/webpack-hmr") every 20secs

Causes and countermeasures

The cause seems to be the Chrome tab of the Next.js app that I was working on separately.

The solution is just to close the Chrome tab in the Next.js app.

Impressions

Without this issue, it would have taken a lot of time like this person. .. ..

So it can be solved in seconds, but since it is a seemingly mysterious problem, I posted it as a Japanese source for the time being.

I hope you find it useful.

Recommended Posts

If you leave the Next.js app open in Chrome, you will get a "/ _next / webpack-hmr" Routing error in the Rails app.
What to do if you get a "302" error in your controller unit test code in Rails
What to do if you get a gcc error in Docker
What to do if you get a DISPLAY error in gym.render ()
What to do if you get a "Mysql2 :: Error: Operand should contain 1 column (s)" error in Rails
What to do if you get an "A server is already running." Error when you try to start the rails server
What to do if you get the warning "Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1." in Rails 6.0
What to do if you get a wrong number of arguments error in binding.pry
[Rails] What to do if you can't get an error message with the errors method
What you need to do to open a file from the menu in the document-Based App macOS app
What to do if you get an error in Basic authentication during Rails test code
What to do if you get a java.io.IOException in GlassFish
If you get a "Quantum Renderer: no suitable pipeline found" error when running the jar file
What to do if you get a JNI shared library error when trying to build in Eclipse
[Rails / Routing] How to refer to the controller in the directory you created
What to do if the image posted by refile disappears after setting a 404 error page in Rails
[Rails] What to do if you get an error saying "Could not find a JavaScript runtime." When executing the rails s command on Catalina
Create a new app in Rails
What to do if you get an error during rails db: reset
What to do if you get a javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake in the IBM JDK
If you get the error The data ca n’t be read because it is missing in docker for mac