Running on Deno?

Deno permissions or Node compat biting you? We sort it out.

Deno looks clean at hello world, then turns awkward the first time a library demands four permission flags, a npm: specifier refuses to load, or a Deno Deploy function trips its CPU budget without a stack trace. We work through the permission model, the module graph and the deploy logs until the runtime does what you expected it to.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

deno-run.log

still broken

What it is

Deno at a glance

Deno is a JavaScript and TypeScript runtime created by Ryan Dahl, who also wrote the original Node.js. The first public release landed in May 2020, and Deno 2 shipped in October 2024 with full Node and npm compatibility, workspaces, and a stable Deno.serve. It runs on the V8 engine, is written in Rust, and leans on Tokio for its async core.

The runtime ships TypeScript, a linter, a formatter, a test runner and a bundler in one binary, and enforces an explicit permission model so a script cannot touch the filesystem, the network or environment variables unless you grant it. Deno Deploy, the first-party edge platform, runs the same code on V8 isolates across regions, with Deno KV and queues available as managed primitives.

Type
JavaScript and TypeScript runtime
First released
2020 (1.0), 2024 (2.0)
License
MIT, open source
Maintained by
Deno Land Inc.
Typically used for
CLIs, HTTP servers, edge functions, scripts, TypeScript-first backends

The honest version

Deno pros and cons

No technology is all upside. This is where Deno earns its place and where it tends to cause trouble.

Where Deno is strong

  • Permissions off by defaultNo script can read a file, open a socket or read an environment variable without a flag you granted. That is a real security posture, not a checklist item.
  • TypeScript with zero configYou point deno at a .ts file and it runs. No tsconfig dance, no ts-node wrapper, no separate build step for day one work.
  • One binary covers the toolbeltFormatter, linter, test runner, bench runner, bundler and docs generator ship inside the runtime, so a new project does not pull in ten dev dependencies.
  • npm and Node compatibility shippedDeno 2 reads package.json, resolves node_modules, and loads npm: and node: specifiers, which closes most of the ecosystem gap that held the original release back.
  • Deno Deploy is first partyThe same code runs on V8 isolates across regions without a wrapper or a build container. Cold starts are milliseconds rather than seconds.
  • Deno KV and queues includedA key-value store and a job queue sit inside the runtime, which removes a layer of infrastructure for small services and side projects.

Where Deno bites

  • Permission prompts surprise newcomersCopying a Node tutorial and running it with deno rarely works on the first try. The second-most-common question in our inbox is which allow flag solves the latest denial.
  • npm compatibility is good, not perfectNative addons, packages that read package.json at runtime, and anything that relies on __dirname in CommonJS still trips. The failure is often a cryptic resolution error rather than a clean rejection.
  • Smaller ecosystem for hosting and toolingCI images, observability agents, framework templates and managed hosts assume Node. Deno works almost everywhere, but the almost is a week of integration you did not budget for.
  • Deno Deploy limits bite at scaleIsolate CPU time, memory ceilings and subrequest counts are enforced hard. A workload that was fine on a VM can hit a wall on the edge without obvious warning.
  • Unstable APIs change between releasesDeno.openKv, Deno.cron and several other primitives moved out of the unstable list over multiple minor versions. Pinning the runtime matters more than the docs sometimes suggest.
  • Hiring pool is thinner than NodeA team used to pnpm, Next.js and tsx will adjust, but you cannot assume prior Deno experience on every candidate.

Sound familiar?

Common Deno problems we fix

The Deno problems that bring people to us, and what you have once each one is fixed.

PermissionDenied: Requires read access

The script refuses to open a file

A dependency reached for a config file, a cache directory or /etc/hosts, and the runtime refused because the required allow flag was not on the command line or in the task definition.

Flags narrowed and committed

Module not found "npm:sharp@0.33.2"

npm packages fail to resolve

A native binding, a package that writes to node_modules on install, or a peer dependency mismatch between the npm: specifier and what the lockfile remembers.

Dependencies resolving cleanly

isolate CPU time limit exceeded

Deno Deploy functions time out

A JSON parse of a huge payload, a crypto loop that ran longer than the edge budget, or a cold start that did more work than the isolate was willing to pay for.

Edge function back inside budget

The lockfile is out of date

CI fails after a dependency bump

A deno.lock that was never regenerated after an upgrade, or a workspace member that pulled in a transitively newer version the root never saw.

Lockfile aligned, CI green

TS2307: Cannot find module 'node:crypto'

TypeScript cannot find the Node builtin

An import that used 'crypto' instead of 'node:crypto', or a types config that is still pointing at a Node-only setup rather than Deno's bundled lib definitions.

Types resolving in editor and CLI

Top-level await is not allowed in CommonJS

A dependency breaks the module graph

An npm package that ships CJS and is being imported from an ESM file with top-level await, or a dual package that picked the wrong entry under Deno's resolver.

Module graph building again

unstable flag 'kv' required

Deno KV refuses to open

A call to Deno.openKv without the unstable-kv flag in deno.jsonc, or a Deploy region that has not been enabled for KV under the current project.

KV connected, flags in config

PermissionDenied: Requires net access

A worker cannot reach an external API

A fetch to a vendor domain that was never on the allow-net list, or a wildcard host that does not match the URL the SDK actually calls.

Allow-net list matches reality

What we do

Deno help, from one error to the whole runtime

Call us for a single permission denial, or let us take on the whole Deno surface.

Rescue
Scripts that will not run, deploys that time out, or npm packages that refuse to load. We get it moving before we write anything up.
Permission audit
Allow flags narrowed to what the code actually needs, written into deno.jsonc tasks and CI so the posture is the same everywhere.
Node to Deno migrations
Moving a Node service onto Deno 2, reconciling package.json, replacing node_modules assumptions, and keeping the test suite honest on the way.
Deno Deploy work
Edge function tuning, KV and queue design, region selection, and keeping isolates inside the CPU and memory ceilings that Deploy actually enforces.
Upgrades
Runtime version bumps rehearsed against your real code, with the unstable flags, lockfile churn and TypeScript shifts handled before production sees any of it.
Managed Tech
Ongoing patching, dependency review, Deploy quota watching, and an engineer on call when a Deno release changes something under your feet.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Deno alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Deno questions

Something else? Call+1 737 727 7327

Should we switch from Node to Deno?

Sometimes, but not always. Deno 2 closes most of the compatibility gap and the permission model is a real security win, but hosting choices, hiring and tooling around Node are still deeper. A pragmatic path is to run new TypeScript services or edge functions on Deno while leaving the stable Node fleet alone.

Why do I keep getting PermissionDenied errors?

Deno refuses access to the filesystem, network and environment unless you grant it explicitly. A library that reads a config file or opens a socket will fail until the matching --allow-read or --allow-net flag is set. The right answer is to narrow the grant to the specific paths or hosts, not to turn everything on with --allow-all.

Can we use our existing npm packages in Deno?

Usually yes, through npm: specifiers or a package.json at the project root. Native addons and packages that mutate node_modules at install time are the common exceptions. We trace the resolution error back to the specific package and decide whether to pin, patch, or pick a replacement.

What are the main gotchas with Deno Deploy?

The hard limits. Isolates have a CPU time budget per request, subrequest counts are capped, and memory is bounded. Code that works in tests can exceed those limits on real traffic, so we profile against the Deploy runtime before committing to it as the production path.

How do we keep Deno versions pinned and reproducible?

A deno.lock in the repo, a version pinned in deno.jsonc or an .dvmrc, and a CI step that calls deno upgrade on a schedule rather than during a build. Unstable APIs should be opted into by name, not by blanket flags that drift.

How much does Deno help cost?

The estimate is free. Send us the failing command, the permissions, and the Deploy or runtime version, and a quote comes back before we touch anything.

Free estimate

Deno giving you trouble?

Send us the command, the flags and the error. A real engineer reads it and writes back with a price and a plan.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.