← All notes

Deno runs npm packages with npm: specifiers and Node built-ins with node: imports

Answer: Import an npm package with an npm: prefix, such as import as emoji from "npm:node-emoji";, and Node built-ins with a node: prefix, such as import as os from "node:os";. Deno downloads the package on first run and stores it in a global cache. Dependencies can also go in package.json or the imports map of deno.json.

Specifier format

npm:<package-name>[@<version-requirement>][/<sub-path>]
import * as emoji from "npm:node-emoji";
import { createServer } from "node:http";
deno run --allow-net main.mjs

Rules to know

How compatible is it

Over 75% of Node's own test suite passes in Deno as of Deno 2.8, covering nearly every node: module. Most pure-JavaScript npm packages work without changes, but some APIs are partial.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Deno docs, Node and npm Compatibility; denoland/docs (GitHub), node.md (source page). MIT (https://raw.githubusercontent.com/denoland/docs/main/LICENSE). Copyright the Deno authors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Deno docs, Node and npm Compatibility; denoland/docs (GitHub), node.md (source page). MIT (https://raw.githubusercontent.com/denoland/docs/main/LICENSE). Copyright the Deno authors.

Cite this

Permanent ID: iil:note:fq83y33g

iinventedlight. 2026. "Deno runs npm packages with npm: specifiers and Node built-ins with node: imports." iinventedlight Library, iil:note:fq83y33g, version of 2026-11-18. https://iinventedlight.com/library/notes/deno-npm-specifiers/. License: CC-BY-4.0.

@misc{iil_note_fq83y33g,
  author = {{iinventedlight}},
  title = {{Deno runs npm packages with npm: specifiers and Node built-ins with node: imports}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/deno-npm-specifiers/},
  note = {Permanent ID iil:note:fq83y33g. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/deno-npm-specifiers.md.