title: Disillusioned with Deno
url: https://www.baldurbjarnason.com/2024/disillusioned-with-deno/
hash_url: 7d2d2bce96cbc020423299e7de03d2cf
archive_date: 2024-01-16
og_image: https://www.baldurbjarnason.com/favicon-96x96.png
description: This is a part of a series where I review the work I’ve done over the past couple of years.
favicon: https://www.baldurbjarnason.com/dark-bird.svg
language: en_US

<p>It’s inevitable that once you decide to review your own business and media strategy, you start to rethink and review other decisions you’ve made in the past.</p>
<p>One of those decisions is <a href="https://deno.com/">Deno</a>, which I’ve used to most of my personal projects and experiments over the past couple of years. Most of these projects have been on the simpler side – command-line scripts or small websites. I made the <a href="https://softwarecrisis.dev/">softwarecrisis.dev</a> newsletter landing page using <a href="https://lume.land/">Lume and Deno</a>, for example. I used Deno to make most of the prototypes for the research project that followed <a href="https://www.colophon.cards/">Colophon Cards</a>. It’s very useful.</p>
<p>There’s a lot to like.</p>
<p>Deno has:</p>
<ul>
<li>Overall much better support for standard browser APIs than node.</li>
<li>APIs that aren’t based on standards hew a lot closer to browser conventions, making switching between the front and back end a lot less jarring.</li>
<li>An excellent standard library.</li>
<li>Much simpler installation. It comes in a single binary, making installation and deployment much simpler.</li>
<li>Most of the tooling you need: linter, test runner, benchmarking, code formatting, type checker, and documentation generation.</li>
<li>A sensible security model for running code.</li>
</ul>
<p>If you have a task that only requires the standard library or the standard tooling, using Deno is a dream – simplicity itself.</p>
<p>If that task requires something <em>more</em> than that, you quickly find yourself in trouble.</p>
<p>The company behind Deno has tried to conquer this problem with a two-pronged attack:</p>
<ol>
<li>Build Deno-specific versions of most of the common tools and projects that web projects might need.</li>
<li>Hastily roll out node and npm compatibility for their runtime.</li>
</ol>
<p>This has meant that a single startup has taken on the responsibility of building their own <a href="https://deno.com/deploy">scalable hosting</a>, <a href="https://deno.com/kv">persistent storage product</a>, <a href="https://docs.deno.com/kv/manual/queue_overview">persistent execution queue</a>, <a href="https://docs.deno.com/kv/manual/#watching-for-updates-in-deno-kv">realtime notification</a>, <a href="https://docs.deno.com/kv/manual/cron">scheduled execution</a>, <a href="https://fresh.deno.dev/">front-end React framework</a>, and no doubt a few more by the time you read this post.</p>
<p>They’re even planning to build their own full-featured package registry for <a href="https://www.reddit.com/r/Deno/comments/15nv8yv/deno_20_previewed_at_seattlejs_conf/">Deno 2.0.</a> (Also, it’s quite annoying how much information out there on the future of Deno is only available in video.)</p>
<p>Add to that the attempt to implement full node and npm compatibility for their runtime.</p>
<p>Basically:</p>
<ol>
<li>Your business model is hosting.</li>
<li>But none of the tools and projects people commonly use are available for your new runtime and hosting environment, so you need to implement your own to fill in the gaps.</li>
<li>Then you discover that the biggest demand for hosting is from clients with legacy code and legacy dependencies, so you kind of have to give them a way to bring them over. Compatibility it is.</li>
<li>Turns out many of the annoying features of the “legacy” system existed for a reason, so you have to implement them yourself, but you obviously do so in newer, modern, more sensible (and less backwards-compatible) ways.</li>
<li>This would be fine – great even – if it weren’t for the fact that you now have to maintain <strong><em>two</em></strong> versions of large parts of your runtime, either as a translation layer from the “legacy” system to your new one, or as two completely independent features that require maintenance.</li>
</ol>
<p>We’ve seen this strategy before. It’s basically <a href="https://www.cloudflare.com/">Cloudflare’s</a>, give or take a few details. Most of the differences in execution are because Cloudflare started on the opposite end of this particular chain of sausages: cloud hosting first, then <a href="https://blog.cloudflare.com/workers-open-source-announcement/">the open source runtime</a>, not the other way around as Deno did.</p>
<p>I find Deno’s tooling to be better, and their runtime much, much easier to use, but the overall strategy for the two companies is the same.</p>
<p><a href="https://bun.sh/">Bun</a> has the same playbook, with their only innovation being that, since they began later, they understood the need for node and npm compatibility from the very beginning.</p>
<p>I don’t think this approach is going to work out that well for any of them.</p>
<p>The “legacy” compatibility effectively removes any incentive to make packages for Deno (or Cloudflare, or Bun). Why use <a href="https://github.com/denoland/dnt"><code>dnt</code></a> to create packages that are compatible with both Deno and Node when you can just make a Node package? <strong><em>It’s still going to be compatible with both Deno and Node.</em></strong> Deno themselves have seen to that. You’re going to get cross-runtime compatibility either way.</p>
<p>The risk is that Deno will effectively become a platform for running code and projects from the npm ecosystem. Except it will never be as good at “node” as node itself.</p>
<p>There are always going to be gaps in the node and npm compatibility layer because <em>node is a moving target</em>. It’s a living project that’s still changing.</p>
<hr>
<p>If Deno were maintained by a foundation or open source community, I’d be less worried. It’d inevitably be smaller in scope, but that would be fine. You don’t need world domination to be a successful community-driven software project. It could find its niche, with time.</p>
<p>But you do need to conquer a big chunk of the world to be a successful VC-funded startup.</p>
<p>There is already a disconnect in the Deno ecosystem. Many of the third party modules seem to be stagnant and haven’t been updated in a while. The projects that do seem vibrant tend to be the ones that target browser-compatible platforms in general and so get Deno, Cloudflare, and Bun support almost for free through little specific effort of their own.</p>
<p>Node hasn’t been standing still either. They’re adding support for many of the features that made Deno special, such as built-in tooling, a <a href="https://nodejs.org/docs/latest/api/test.html">test runner with coverage</a>, and <a href="https://nodejs.org/docs/latest/api/esm.html#https-and-http-imports">HTTP imports</a>. Even <a href="https://github.com/nodejs/loaders#milestone-3-usability-improvements">import maps</a> are on their roadmap.</p>
<p>The fate of Node also doesn’t depend on the fate of a single startup or tech company.</p>
<p>The npm ecosystem remains a strategic liability, but adding support for import maps and HTTP imports will go some way to mitigate that and in the meantime you can install node packages <a href="https://medium.com/pravin-lolage/how-to-use-your-own-package-from-git-repository-as-a-node-module-8b543c13957e">directly from git</a> or use an npm-compatible third party repository. <a href="https://docs.npmjs.com/cli/v10/commands/npm-install#:~:text=npm%20install%20%3Cgit%20remote%20url%3E">Any git remote URL should work with <code>npm install</code></a> – no GitHub required.</p>
<p>Seeing money and talent drain out of the software ecosystem, companies switch en masse to inherently conservative LLMs for development, and a growing frustration among software developers in general, it’s hard to envision a future where Deno or Bun win out in a direct competition with Node.</p>
<p>I’m not convinced I want to be using either of them once their VC-backed startups become desperate.</p>
<p>For those of us who <em>do</em> like to work in JavaScript, this means that Node is our best bet for the back end in the long term.</p>
<p>It’s probably time to try to recreate in node what has made Deno such a joy to work with.</p>
<p>But Node’s improvements aren’t the only issue facing Deno.</p>
<p>The big one is that the logical alternatives to Node – the “no Node” work environments developers are likely to reach for <em>aren’t going to be based on JavaScript</em>. Import maps mean that browsers effectively have an API surface that non-JS projects can use to build a dependency management system. Much of the tooling surrounding JavaScript is now implemented in <em>Rust</em>, not JS – much of it driven by Deno itself – and that makes it more easily accessible outside both the Node and Deno ecosystems. <a href="https://component-model.bytecodealliance.org/">The WASM component model</a> additionally promises to make many dependencies runtime-independent, with the Rust-based tooling around JS being logical initial targets.</p>
<p>The “no Node” alternative for many won’t be another JavaScript runtime, but instead <em>something completely different.</em></p>