Comparisons

Deno vs Node.js: npm, permissions, TypeScript, tooling and which to use in 2026

Deno vs Node.js as of November 2026: npm compatibility, permissions, TypeScript, tooling, versions, Deno's Cloudflare news, and running both on a VPS.

Published ~8 min read
On this page

Short answer: Node.js is the standard server-side JavaScript runtime, with the whole npm ecosystem and long-term support lines. Deno is a newer runtime with TypeScript, a permission sandbox and a formatter, linter and test runner built in, and it runs most npm packages. But on 9 October 2026 Deno announced that its team is joining Cloudflare and will end its own development of the runtime after one more year of maintenance releases, so for a new production service Node.js is the safer choice.

one TypeScript file, both runtimes
// server.ts, next to a package.json that sets "type": "module"
import { createServer } from "node:http";
const port: number = Number(process.env.PORT ?? 8000);
createServer((req, res) => res.end("hello\n")).listen(port, "127.0.0.1");

# Node.js 22.18+ or 23.6+ strips the types and runs it, with full access by default
node server.ts

# Deno grants nothing by default: allow this port and this variable only
deno run --allow-net=127.0.0.1:8000 --allow-env=PORT server.ts

Both run on Google’s V8 engine, and Deno implements Node’s built-in modules such as node:http, which is why the same file works in both. Versions and behaviour below are from nodejs.org, the Node.js release schedule, docs.deno.com and deno.com, read on 13 November 2026; we did not run either runtime for this page.

Deno vs Node.js at a glance

Node.jsDeno
Current release26.13.1 (26 Lithium, Active LTS); 24 and 22 in maintenance; 27 in alpha2.9.8, released 21 October 2026
Support outlookEach LTS line gets 30 months of fixes; v26 until 30 April 2029Monthly bug-fix and security releases for one year from 9 October 2026, then development by the Deno team ends
TypeScriptErasable types stripped by default; no type check; tsconfig ignoredFull TypeScript built in; deno check type-checks
PermissionsFull access unless started with --permissionNo file, network, env or subprocess access unless granted
npm packagesNativenpm: specifiers and package.json; most packages work, native addons need extra flags
Built-in toolingTest runner, watch mode, --env-file, node --runfmt, lint, test, check, bench, compile, doc, task and more
LicenceMITMIT

Deno’s future after the Cloudflare announcement

This changes the comparison more than any feature. Per the announcement on deno.com on 9 October 2026:

  • the whole Deno team is joining Cloudflare, to combine its work with the Workers and Durable Objects teams there;
  • the Deno runtime gets “another year with monthly releases containing bug fixes and security updates”, and after that the team ends its development of it;
  • Deno “will remain open source” (the repository is MIT-licensed), and others are welcome to continue it;
  • Deno Deploy runs for six more months and then shuts down, with migration help to Cloudflare Workers for paying customers; JSR, the package registry, keeps running.

Deno is not gone: 2.9 shipped in June 2026 with Node.js 26 compatibility, and a code base you own keeps working. What is gone is the guarantee of new major versions from the people who built it. Node.js, by contrast, publishes its release schedule years ahead: from Node.js 27 onwards, every major version becomes LTS and gets 30 months of support.

Runtime design

npm compatibility

Node.js is where npm packages are written and tested. Deno’s compatibility layer makes them usable anyway: import a package with an npm: specifier or use an existing package.json with deno install, and Deno downloads it into a global cache. Deno’s own documentation says that as of 2.8 over 75 percent of Node’s test suite passes. The gaps it lists: some Node APIs are partial, packages with native addons need a local node_modules and --allow-ffi, install scripts only run after you approve them, and ES modules with top-level await cannot be loaded with require().

Permissions model

Deno is sandboxed by default: without flags, code cannot read files, open sockets, read environment variables or start processes. You grant each one, optionally narrowed to paths, hosts or names: --allow-read=./data, --allow-net=example.com, --allow-env=API_KEY, --allow-run=git, or -A for everything. Deny flags override allow flags, and the docs warn that --allow-run and --allow-ffi are as good as full access.

Node.js has had an opt-in permission model since v20, stable since 22.13 and 23.5. Start with --permission and the process cannot even read its own entry file until you add --allow-fs-read, plus --allow-fs-write, --allow-net (added in v25), --allow-child-process and the like as needed; --permission-audit (v25.8) only reports what would have been denied. Node’s documentation is explicit that this is a seat belt for trusted code, not a security boundary against malicious code.

TypeScript

Both now run .ts files without a build step, in different ways. Node.js strips type annotations (default since 22.18 and 23.6, stable since 24.12 and 25.2): no type checking, tsconfig.json ignored, file extensions required in imports, and syntax that needs code generation, such as enum or parameter properties, fails unless you use a tool like tsx. Deno runs the full language, enums included; deno run skips type checking by default, deno check or --check runs it, and deno test checks by default.

Tooling

Deno ships one binary with a formatter (deno fmt), linter, test runner, benchmark runner, documentation generator, task runner and deno compile, which builds a single executable. Node.js has grown its own: the node:test runner (stable since v20), --watch (stable since 22.0 and 20.13), --env-file and node --run for package scripts. Formatting, linting and type checking still come from npm packages such as Prettier, ESLint and TypeScript, which is more setup but also the setup most teams and CI templates already assume.

Running either on a VPS with systemd and nginx

On a server, both are long-running processes: bind the app to 127.0.0.1, let systemd start and restart it, and put nginx in front for TLS. A unit file for the example above, run as an unprivileged user app:

/etc/systemd/system/api.service
[Unit]
Description=Example API
After=network.target

[Service]
User=app
WorkingDirectory=/srv/api
Environment=PORT=8000
# Deno, installed with the official script into /home/app/.deno/bin:
ExecStart=/home/app/.deno/bin/deno run --allow-net=127.0.0.1:8000 --allow-env=PORT server.ts
# Node.js instead (use the path that "command -v node" prints):
# ExecStart=/usr/bin/node --permission --allow-net --allow-fs-read=/srv/api server.ts
Restart=on-failure

[Install]
WantedBy=multi-user.target
enable it, then proxy to it
sudo systemctl daemon-reload
sudo systemctl enable --now api
journalctl -u api -f

# in the nginx server block
location / {
    proxy_pass http://127.0.0.1:8000;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

The full walkthroughs are in creating a systemd service and nginx as a reverse proxy with SSL; logs are read with journalctl. Deno updates itself with deno upgrade; Node.js updates through whatever installed it, so prefer a source that tracks the LTS line rather than an old distribution package. If npm is missing after installing Node.js, see npm: command not found.

Deno or Node.js: which one should you pick?

  • A new production service you will run for years: Node.js on the current Active LTS line (26). Predictable support dates, the reference npm runtime, and the most hosting and CI documentation.
  • An existing Deno app: keep it running and patched; security releases continue for a year from October 2026. Because Deno runs most Node code and node: modules, moving the app to Node.js later is mainly a matter of replacing Deno-only APIs and the permission flags.
  • Scripts and internal tools where a sandbox helps: Deno’s deny-by-default flags are still the stronger default, as long as you accept the support outlook.
  • TypeScript with no build step: both work; Node.js only for erasable syntax, Deno for the full language.
  • Code that targets Cloudflare Workers: follow Cloudflare’s own runtime and tooling rather than either local runtime’s defaults.

Frequently asked

Is Deno better than Node.js?

Deno has the nicer defaults: TypeScript, a deny-by-default permission sandbox and a formatter, linter and test runner in one binary. Node.js has the larger ecosystem, published long-term support dates and, since October 2026, the clearer future, because the Deno team announced it will end its own development of the runtime after one more year of maintenance.

Is Deno being discontinued?

On 9 October 2026 Deno announced that its team is joining Cloudflare. The runtime gets monthly bug-fix and security releases for one more year, after which the team ends its development; Deno remains open source under the MIT licence, and others may continue it. Deno Deploy shuts down after six months, while the JSR registry keeps running.

Can Deno run npm packages?

Yes, most of them. Import them with npm: specifiers or install from an existing package.json with deno install. Packages with native addons need a local node_modules folder and --allow-ffi, and their install scripts only run after you approve them.

Can Node.js run TypeScript directly?

Yes. Since Node.js 22.18 and 23.6 it strips type annotations by default, and the feature is stable since 24.12 and 25.2. It does not type-check, ignores tsconfig.json and rejects syntax that needs code generation, such as enums, unless you use a tool like tsx.

Related articles

All comparisons