web complex

Deno in Production: A Real-World Experience in 2024

In the ever-evolving landscape of web development, choosing the right technology can be challenging. As I work on a project re-vamping an API gateway, I’ve recently explored Deno as our JavaScript runtime, and I’d like to share my insights from our production journey.

Compatibility and Performance

Deno v2 was a significant milestone that resolved many Node.js compatibility issues. While some minor challenges remain, the runtime has proven surprisingly robust. The application using NestJS runs smoothly, and I’ve particularly appreciated the ability to compile binaries that dramatically reduce our Docker container sizes.

Development Experience and Tooling

The developer experience with Deno has been mostly positive. Instead of relying on traditional tools like ESLint or Prettier, I’ve found Deno’s built-in linter and formatter more than adequate. However, I encountered a notable challenge with dependency management: Renovate, a popular automated dependency update tool, doesn’t seem to support Deno’s deno.lock file fully. As a workaround, I’ve been using pnpm to manage our dependencies effectively.

Testing and Monitoring Limitations

Testing has been an area with room for improvement. While Vitest works, the lack of VS Code plugin support and incomplete V8 coverage implementation 1 can be frustrating. I’ve transitioned to using @std/testing, an official testing tool provided by the Deno team. Similarly, OpenTelemetry support remains partial, though official improvements are in progress2.

A Pragmatic Approach

My strategy involves maintaining flexibility. By avoiding Deno-specific APIs and keeping a package.json, I ensure I can seamlessly transition back to Node.js if needed. This risk mitigation approach has been crucial.

Looking Forward

Despite some limitations, the Deno team’s rapid improvements and community engagement are impressive. While I’m currently limited to reporting issues3, I hope to contribute more directly to the runtime’s evolution through code in the future.

For developers considering Deno in production, my advice is to approach it with cautious optimism. The runtime shows immense promise, and its evolving trajectory offers an exciting alternative for modern JavaScript development.