-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Middleware error #87
Comments
I'm getting a similar error on next@13.1.2 (running prod build locally):
Followed the basic setup examples from the doc site, but it seems related to the use of Any suggestions would be greatly appreciated! |
@jcarenza Same here for next@12.3.4 |
After some trial and error I found out that this issue got resolved for me after downgrading to Node |
@nibtime Same it's happening to me, downgrading node is not an option in my case :/
Any suggestions on why this is happening and possible solutions? |
Also getting this error.
I searched around for this particular error message as it gives the impression of being a platform error. I found a few sources of which most end up mentioning this issue: nodejs/undici#1248 In this issue one possible cause is presented that has to do with DNS: nodejs/undici#1248 (comment) Unlike in older node versions, in newer versions This means that in newer node, One suggested workaround is to comment out the line On some platforms this will result in Another suggested option is to use
(Based on the error message we were able to find out that a fetch fails in Another possible workaround is to configure node >=18 to behave like older node versions, by setting:
https://stackoverflow.com/a/72416352/599991 (found through this comment) I tested this approach and it seemed like it worked. A possible underlying detail which explains the inconsistency between the Using |
When following the Getting Started guide on a fresh next@12.3.4 version I always get the following error on a local build:
Error [TypeError]: fetch failed
. It works fine on the development server but once I build locally every page throws a 500 error. This seems related to the middleware implementation as it works fine without it.The text was updated successfully, but these errors were encountered: