What breaks when you ship Next.js on Cloudflare Workers
The article discusses the challenges of deploying Next.js applications on Cloudflare Workers. It highlights the need to replace certain Node.js dependencies with compatible alternatives for the Workers environment. Additionally, it outlines specific implementation details and workarounds encountered during the development process.
- ▪Cloudflare Workers do not support Node.js, requiring developers to find compatible packages.
- ▪The author replaced bcrypt with Argon2id for password hashing due to compatibility issues.
- ▪The article details the process of handling Yahoo Finance's crumb token for API requests.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3882394) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } William March Posted on May 16 • Originally published at finterm.xyz What breaks when you ship Next.js on Cloudflare Workers #webdev #nextjs #javascript #cloudflare I've been building Finterm, a financial terminal that runs entirely in a browser tab, on Cloudflare Workers via @opennextjs/cloudflare. The promise is the obvious one — global edge runtime, near-zero cold starts, pay-per-request pricing. The catch is that Workers don't run Node.js.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).