←back to thread

Next.js is infuriating

(blog.meca.sh)
1033 points Bogdanp | 1 comments | | HN request time: 0.203s | source
Show context
Rauchg ◴[] No.45100460[source]
Heard and appreciate the feedback. We’re well aware of the DX papercuts in Middleware. With 15.5 we made a big step in supporting Node runtime[1] which addresses a slew of issues people have reported over time.

If I went back in time, I would have called it Routing Middleware or Routing Handler. A specific hook to intercept during the routing phase, which can be delivered to the CDN edge for specialized providers. It’s also a somewhat advanced escape hatch.

Since OP mentions logging, it’s worth noting that for instrumentation and observability we’ve embraced OpenTelemetry and have an instrumentation.ts convention[2]

[1] https://nextjs.org/blog/next-15-5#nodejs-middleware-stable

[2] https://nextjs.org/docs/app/api-reference/file-conventions/i...

replies(8): >>45100602 #>>45100630 #>>45100658 #>>45100894 #>>45101395 #>>45101475 #>>45104120 #>>45108837 #
1. RadiozRadioz ◴[] No.45108837[source]
> Since OP mentions logging [...] we’ve embraced OpenTelemetry

I really hate this stuff. Users raise feedback for something they need, the dev team considers the feedback, they spend a really long time thinking about the most perfect abstraction, scope the problem way out to some big fundamental system, and come up with an extremely complicated solution that is "best". The purist committee-approved solution could technically be used to address what the user asked for, with a lot of work, but that's no longer the focus. Pragmatism goes out the window; it's all about inventing fun abstract puzzles.

All the while, the user just wanted to log things.

Not saying that's the exact situation here, but the phrasing in the comment was all too real to me.