7 ms·
Next.js 15.1 is unusable outside of Vercel
- dimitrisnl 1y agoOof. I'm sure Vercel might patch this issue. But I had had enough of these little annoyances. For example, the documented way to identify prefetches in the middleware has been broken for weeks (months?). A lot of small issues that keep adding up. I'm not going to shill something else here, but I have a bit of Next.js fatigue lately. Still love the JS ecosystem though. Anyway, thanks for bringing this up!
- dimitrisnl 1y agoAnother follow-up. Some libraries[1] started to break from 15.1.8 onwards, so you had to downgrade to the vulnerable versions the author mentioned as well. [1]: https://github.com/hashicorp/next-mdx-remote/issues/488 https://github.com/hashicorp/next-mdx-remote/issues/488
- drag0s 1y agoI'm still using Next.js in my work and projects because I still think it may be the best way to ship React to production, but it used to be something fun, enjoyable and productive. sometimes I feel a bit sad about the direction it's going in since the move from pages to the app router.
- skyeto 1y agoCurious, anything specific that you'd highlight compared to a setup like Remix that make it easier to ship with Next?
- dimitrisnl 1y agoWell, they have consistent naming for a start.
- koakuma-chan 1y agoRSC
- dimitrisnl 1y agoThe best way to ship React to production is with Vite. It opens up tons of options (Tanstack, RR, Simple SPA, whatever) and you don't even bring the hosting provider into the discussion.
- tisdadd 1y agoThis - I spent quite some time fighting the new Next.js conventions not working for me making a legit web app instead of traditional site, switched to vite and was like yay, things work again and so fast. Normally I am all about embracing the framework, but kept thinking for what was happening I could use PHP instead and host anywhere.
- ekojs 1y agoI share the sentiment. I think we will only be using Next.js for static sites/prebuilt SPA in the future.
- Zealotux 1y agoYou probably have better alternatives for that: Astro, React Router 7, TanStack.
- csomar 1y agoActually Next.js with App router (and with Pages being pushed out) is really bad for SPAs. See this thread: https://github.com/vercel/next.js/discussions/64660 https://github.com/vercel/next.js/discussions/64660
- miyuru 1y ago> I think we will only be using Next.js for static sites/prebuilt SPA in the future. With whats mentioned in the blog post I would not use it even from static builds.
- woutr_be 1y agoI moved away from Next.js, and switched to Astro. Originally I just wanted to go back to basics, but didn't want to bother with having to set up all my routes, templating, serving static assets, build tasks. Astro just handles all that, and it's SSR by default. I also feel that Astro uses React/Vue as it was intended, as an interactive layer on top of HTML. It also made me realize how little I needed JS frameworks to begin with. Next just started to feel like to much magic, the server actions felt weird, and just lots of things that required the "NextJS way".
- dimitrisnl 1y agoI tried various astro sites, and as a user, a few things keep bugging me. - Visit their docs https://docs.astro.build/en/basics/astro-pages/ https://docs.astro.build/en/basics/astro-pages/ - Click `Routes` in the navigation Now: 1. There's a flicker in the content where the sidebar moves on the left 2. The title displays `docs.astro.build` for a split second before it says "Routing | Docs" Especially the second is quite annoying. I see it in every Astro site.
- koakuma-chan 1y agoHere is one Astro site https://mayo.clumsy.fish/ https://mayo.clumsy.fish/ with no flickers. Astro is pretty good but after trying RSCs I'm not going back.
- woutr_be 1y agoThat seems to be mostly because of the way they've implemented their docs. It's definitely not something I have with my own sites. The flicker seems to be because the collapsible nav items are done on the client, and closed by default. I'm not sure where the title issues are coming from.
- iw7tdb2kqo9 1y agovercel made a streaming metadata feature and add an option to opt-out (htmlLimitedBots). Is there anything else?
- Illniyar 1y agoIt made it by default. It's also not much of an "opt-out". An opt-out would be called "disableStreamingMetadata". Names convey intent, and it's obvious this is intended to be the behavior for all users with maybe an exception. The problem is that this is needed for a minuscule amount of users. This should've been an opt-in. The choice to make it opt-out is quite weird.
- iw7tdb2kqo9 1y agomake sense now. They should add disableStreamingMetadata option to completely disable it instead of disabling it by matching user agent in a irreverent field name. Many people choose Next.js because it has better SEO support than other options.
- jasoncartwright 1y agoPost suggests the underlying problem is the metadata takes too long to put in the HTML? A few tags? Really? This kind of problem, and the vendor lock-in, is completely unimaginable for any web framework I can think of. Bizarre.
- Illniyar 1y agoI think it was that if metadata requires getting data from third parties or something, it takes a long time, and it doesn't affect what the user sees. It did say this was a problem for very few people.
- Bengalilol 1y agoImplementing an option in order to stream metadata would have been more smart. Am I missing something obvious ?
- bravesoul2 1y agoThat's "deprecating EKS for Omega star at the end of the month" level of dumb. Let the programmer do high latency shit if they want. Give them a damn catch if they need it.
- joquarky 1y agoStill waiting on support for ISO timestamps...
- koakuma-chan 1y agoEverybody should be talking about how it takes Next.js 10 seconds to compile a route in development mode. Rust compiler is smoking in the corner.
- christophilus 1y agoIt’s unusable. The worst devx I’ve experienced since… dunno. I can’t think of a stack I’ve worked with that I loathed more since that one and only time looked at helping someone fix their Sharepoint site.
- aj_g 1y agoFor real. It makes me feel like I'm coding in C++ again. I have the suspicion that many Next aficionados are using M12 Macs with 512GB RAM and don't know how bad the DX is on anything less than a bleeding edge machine.
- bravesoul2 1y agoYeah it's at least 200 millisharepoints of bad.
- tonyhart7 1y agorust compiler actually do compiling, are you sure that next js compiler do the same thing?
- koakuma-chan 1y agoIt's mostly running Vercel spyware.
- celicoo 1y agoDo you care to elaborate?
- koakuma-chan 1y ago
- Aeolun 1y agoNext has become a joke. It’s mildly frustrating that with Remix’s inexplicable transformation into react-router, there’s few great react frameworks left (for me), I’m back to plain vite with tanstack router.
- freeqaz 1y agoWhat are the best alternatives? Why Vite? I use Next for a handful of small projects, and SEO was always touted as the big benefit to me. I can just generate a bunch of static files, copy to S3, and be done. Is that not true anymore?
- EspadaV9 1y agoI've been trying and learning TanStack Router with a new project and it's been really nice, so nice that I then added TanStack Query, and then also added TanStack Form.
- ggregoire 1y agoTanStack Query is the best library in the entire frontend ecosystem IMO. I'm still using React Router tho (as a dumb SPA router, not the new "framework" features). I might take a look at TanStack Router one day.
- zackify 1y agoI’m surprised this post is able to stay up on hackernews. One time I simply made a post about how a page was simpler to code and understand in Remix. You may not believe this but I had 3+ chat requests from multiple employees at vercel. Across multiple social media accounts. All asking to take it down or meet and discuss with them.
- Havoc 1y agoFrontend continues to be a wild west...
- bravesoul2 1y agoThis is also a backend
- icemelt8 1y agoI still dont understand the lie, that its difficult to host next.js. I am hosting several nextjs apps for my day job. We just put them in a docker and throw them on the server, whats the confusion?
- tonyhart7 1y agomaybe because you did not use that much of serverless function that vercel natively support lets be real here, vercel did not maintain next js for a "free lunch" they want people that use next js be the customer of vercel
- koakuma-chan 1y agoIt's hard to get Next.js to build because it runs your code during build time, and it has some obscure DynamicError shit, I barely got it to work somehow.
- koonsolo 1y agoThe confusion is that there are plenty of front-end developers that have no clue what they are doing, and then blame it on the tool. Believe me, I interview plenty of front-end developers each month. The main problem is that building a website is very different than programming a web application. As a senior software engineer with a Masters degree in CS, NextJS works great for me. Another poster here claims an <Image> drops his Three.js to 2 fps, and of course blames it on NextJS. I work with Three.js, and never seen such issue (React-three-fiber however does have some peculiarities). Before blaming some random tool, maybe first investigate where the problem lies. If you pinpointed it to NextJS, sure, it's NextJS. Before that, don't blame anyone but yourself. I always laugh when I read HN and Lobster commenters. I use NextJS and LLM's, and I leave my competitors in the dust. So yeah, the proof is in the pudding, not in some random folks commenting on the internet. This also reminds me of some commenter here on HN who was angry at Java because their sorting function was unstable for many years :D.
- jowday 1y agoDude, I explicitly replied that I pinpointed it to Next. The moment I removed the Image tag and replaced it with a regular <img />, it resolved itself. I didn’t even say I was using three, did I?
- h1fra 1y agohow many times vercel can reinvent sending html to the browser?
- jowday 1y agoDon’t ever use Next. Terrible developer experience, vendor lock in, weird undocumented conventions that make building anything other than some kind of B2B SaaS CRUD site full of undocumented foot guns. My favorite thing I’ve encountered is the Next <Image /> tag somehow dropping the FPS on a webgl scene on the same page to 2 FPS.
- aitchnyu 1y agoHow was Vercel able to frog-boil normal React users with vendor lock-in? React was supposed to be Meta's baby and open source was supposed to defeat vendor lock-in.
- pas 1y agobecause they pushed shiny new features that are reaaaallly good for a certain set of commercial users (think webshops, where time to first contentful paint equals time to money) and the tech is not bad, it's just meh (immature and a bit misguided) after all by flipping the whole thing upside down, defaulting to server-side, a lot of previously hard problems became easy (the usual glueing of different APIs - user, CMS, metadata, "security", adtech, blablabla - translate to `const user = await auth();` and so on, and still after processing the request emitting a React page is kind of nice, Server Actions are also nice because Next manages the API URLs for you), and since mobile technology (phones and networks) evolved a lot it's not a problem to do a request for each page (especially on webshops where Next prefetches the ha$$y path)) but it's still a very subpar backend framework :/
- darajava 1y agoCan you suggest alternatives? I've used Next and Svelte[kit] in prod and have been very unhappy with both.
- flashblaze 1y agoMight not hurt to look into React Router 7 Framework mode. I've started using it in one of my side projects and loving it so far.
- sali0 1y agoNext and RSCs have become some of the most frustrating things I've worked with on frontend. Dealing with FE is already annoying enough, but having to wrestle the magic of Next and then vendor lock-in to Vercel to top it off. Team is trying out Tanstack router + vite this week. Excited to build a regular ass CSA.
- koakuma-chan 1y ago> Next and RSCs have become some of the most frustrating things I've worked with on frontend What is frustrating about RSCs? They work really well for me and I'm still using Next.js only because of RSCs.
- sali0 1y agoIt's fine if you know them well. The unclarity in boundaries between client and server components, and the unintentional complexity that brings, is just frustrating to work with. I will gladly take a CSA any day. But don't let a random internet stranger detract you. If it works for you, go for it.
- GHanku 1y ago[dead]
- Fizzadar 1y agoSomeone thought it’d be an optimisation to send meta tags outside of the initial request response? For real? The frontend universe is so unhinged.
- celicoo 1y agoIt's really sad what Next.js has become. I still use it, but I have to maintain my own fork with patches. The next.config.js file is an ugly escape hatch that lets you change default behavior for things that should be properly extensible instead of being hidden behind "feature flags" in the first place. Honestly, the framework is a solid D grade at this point — complete spaghetti code.
- bravesoul2 1y agoI don't know. I felt NextJS got too complicated for me years ago and may have had a sweet spot back then when it felt magic. Now id just use a boring web server for most things. Chuck on a front end framework when needed for a SPA. If you choose classic or SPA things are far more simple.
- pas 1y agopeople who were[0] "not even wrong" about understanding how an SPA maps naturally to the server-client boundary are now free to cook their fine pasta-based product however they think is best. [0] still are ... ¯\_(ツ)_/¯
- toastercat 1y agoI'm gonna go out on a limb and say most people who are building dynamic web applications don't need server-side rendering.
- skeptrune 1y agoVite has gotten really good and I don't need NextJS anymore to make React easy. However, it did really feel like magic a few years ago and has become the default choice. At this point it's a legacy framework that we all have to deal with the same way Spring is.
- 5Qn8mNbc2FNCiVV 1y agoThis seems blown out of proportion. Anyone who knows how streaming in React works knows, that you can't stream your HTML line by line. And there was the need to not block first paint (HTML, not JS) just because of metadata. It's reasonable to have a list of user agents that are exempt from that behavior since those are also not the bulk of your traffic where you want to show something as fast as possible. How would you instead solve this, with the requirement that some users have metadata that takes a while to load?
- nithssh 1y agoI used to wonder what was the play with pouring so much money into making a React framework the default. Now I understand the play
- revskill 1y agoThe FE community will do everything it can to avoid sending html to browser.
- DataDaemon 1y agoFriendship ended with Next, now Astro is my best friend.
- the_other 1y agoVercel recently spammed my work email with news about a local talk/webinar. On the one hand that's useful info (I'm a front-ender after all). On the other hand it's freaking creepy. I've been in this job three months and hadn't signed up to anything Next/Vercel from my work email. That means (at best) they scraped me from LinkedIn and guessed at my email address. At worst I've left a data trail that someone's compiled me into a few categories and Vercel bought me in a bundle. Clever growth hacking, give that employee a bonus, but jeez is it why I hate parts of the interwebs these days.
- punkbit 1y agoFor Frontend development, my recommendation is Vitejs. For content-heavy sites, try Astrojs! I've never opted for Nextjs for any client, but have experienced having to get rid of Nextjs from client projects.
- tonyhart7 1y agoits crazy how perspective shifted that maybe 4 years ago that next js is preferred choice but here we are
- harrisi 1y agoI've been saying for years that everyone should put much more consideration into using anything that Vercel has its hands in, such as React, Next, and Svelte. Their goal is to lock people in the same way Heroku did, but even more aggressively by tying people to their full stack solutions from the language to the runtime to the machines. Not that they're the only company to be weary of. I recently found out that Cloudflare's CLI tool for development and deployment only supports macOS 13.5+, which is less than two years old. I couldn't track down why exactly, but it's a sad state of affairs when two years is considered obsolete. In fairness, you can still use an older version of wrangler, but it's a previous major version. Documentation and features are misaligned, and will only get worse. They could also break compatibility with it on their end in the future. Meanwhile, new versions of other tools like vim, neovim, emacs, llvm, etc. all still work fine on OS X. I'd argue it's because they have no incentive to lock people in.
- randomuxx 1y agoI’ve worked with Next.js professionally for the past 3 years, and it’s been torture. (hosted on Vercel, and the company used almost every single service Vercel sold. Worst vendor locked-in ever) I replied to Dan’s previous HN post about RSC, sharing how I had a terrible experience and he was right to highlight: "I think RSC itself is pretty solid by this point but frameworks around it (primarily Next.js) are still somewhat rough." React is fairly mid overall, and Next.js is only accelerating its bad reputation. Stay away!
- Panchitous 1y agoIt’s opinionated, and they’ve been pushing streaming—just like the React team—right? Yes. Is it unusable outside of Vercel? No. As far as I know, Next works without hiccups if you deploy to containers. However, that’s not our case, as we use Lambdas on AWS. We’ve been using OpenNext since the early versions. I must add that I’ve followed a lot of libraries on Discord, and among all those I’ve joined (PayloadCMS coming second), there’s none as helpful, friendly, and open to discussing issues as OpenNext. We serve millions of pages per day at TelevisaUnivision, and we have nearly 5 million pages indexed on Google. Since migrating to RSC nearly three years ago (we started with the betas), we now pay only 10% of what we previously did on AWS, and we’ve transformed almost all of our poor-performing pages into fast ones in Google Search Console. We cache significantly more now and don’t follow the typical caching conventions of Next/OpenNext—we use ElastiCache with Redis. Nonetheless, the framework and library have enabled us to do this and even allowed us to use a different CDN (currently Fastly, previously Akamai). We trigger our deployments from GitHub Actions using SST. It’s opinionated, and one of the individuals behind it isn’t the friendliest, but it works—so I respect it for that.
- thdxr 1y agowhat did i do to you!?
- 6ak74rfy 1y agoWhat's the recommend full-stack setup, if not NextJS? My background: I have ~15 years of software development experience, but practically all of it in backend stuff. (Well, I did some AngularJS a decade ago but that's it.) So, when I recently wanted to build a fullstack app for the first time for a side project, I looked around and learnt NextJS was the way to go. (Gemini said that, then Cline's official documentation said the same.) I am early in the process, so happy to learn of solid alternatives. I am planning to host everything on some VPSes through Docker, because that's what I am comfortable with. So, no Vercel or Netlify.
- ggregoire 1y agoIf you don't need server rendering, I'd just recommend React without framework, and Vite [1] to run the app in dev and build the app in prod, then host the build (basically a HTML page with a JS file) on AWS S3 or similar static hosting platforms. That's the solution I've been using for 10+ years without any problem. For the backend you can use whatever you are comfortable with. I mostly use PostgREST [2] nowadays. I recommend to use react-query [3] to call your APIs on the client side. [1] https://vite.dev https://vite.dev [2] https://docs.postgrest.org https://docs.postgrest.org [3] https://tanstack.com/query/latest/docs/framework/react/overview https://tanstack.com/query/latest/docs/framework/react/overv...
- pfych 1y agoThis is the way to go for 99.9% of React apps, I've been using a similar setup for almost 7 years now. Plain React, Vite, React-Router, & SWR. Is simple & works great for almost every use case.
- consumer451 1y agoWhat are you building? I am working on a classic SaaS webapp, and I have found that using React/Refine.dev/Vite has been great. Refine.dev let me focus on my features, and not basic CRUD page stuff.
- 6ak74rfy 1y ago
- d13z 1y agoThis might be confirmation bias but I'm very happy that we picked Astro over NextJS. Support for Standalone server is a must for our case since we run the biggest classifieds site in Germany and vercel costs are impossible to pay. Here is an article I wrote of why we chose it https://d13z.dev/blog/07-why-kleinanzeigen-picked-astro-over-nextjs/ https://d13z.dev/blog/07-why-kleinanzeigen-picked-astro-over...