July 2nd, 2024

Node 18 Ate My Website

The author upgraded their Next.js website to Node.js 18, facing issues with deprecated dependencies. They rebuilt the site with TypeScript, Contentlayer, Tailwind CSS, and Vercel Analytics, emphasizing simplicity and emerging technologies.

Read original articleLink Icon
Node 18 Ate My Website

The author upgraded their Next.js website from Node.js 16 to Node.js 18, leading to multiple issues due to deprecated dependencies. After facing various errors and challenges, they decided to rebuild the site with a more maintainable architecture. The new site involved significant technical decisions, such as transitioning to TypeScript, upgrading Next.js, using Contentlayer for Markdown handling, switching to Tailwind CSS, and adopting Vercel Analytics. They also made changes like replacing Chakra UI with Tailwind CSS, updating code highlighting tools, and optimizing the development experience. The author documented their decisions and reasoning, highlighting the importance of maintaining simplicity, reducing dependencies, and embracing emerging technologies. Despite the unexpected rebuild, the author found the process rewarding and encourages others to consider similar approaches for improving their websites.

Link Icon 5 comments
By @swatcoder - 4 months
There's a teaching moment in here about the downside of engineeeing a project like a quilt made of other people's code.

The more disparate dependencies you adopt, the more of this kind of headache and chaos you invite into your future. You may gain some development speed, or get to put off having to think through and implement something in a domain that intimidates you, but you do set yourself up for major synchronization and migration problems that look a lot like this.

I've mostly given up trying to convince people to use fewer dependencies, to know them each better, and to shim them aggressively so that they can be trivially replaced -- but I hope people are at least starting to recognize the tradeoffs they accept when they don't.

By @qiller - 4 months
The pace of javascript ecosystem is annoying at times. The first issue is due to deprecation of md4 hash and can at least can be worked around which may allow to avoid upgrading _some_ dependencies - https://stackoverflow.com/a/72219174
By @johnz - 4 months
I had a very similar experience a few years ago and decided to switch from Next to Astro [0].

[0] https://astro.build/