---
title: "Why We Added package.json Support to Deno"
description: "Deno added package.json support because its HTTP-import module system, though decentralized and manifest-free, suffers from the Duplicate Dependency Problem, the clunky deps.ts pattern, non-composable import maps, and the limits of transpile servers like esm.sh."
url: "https://swe.quest/articles/why-we-added-package-json-support-to-deno-0e46f636e0588f6e"
canonical: "https://deno.com/blog/package-json-support"
source: "Deno"
published: "2023-03-20"
difficulty: "easy"
kind: "Opinion"
reading_minutes: 6
tags: ["javascript","build-systems","runtimes"]
---

# Why We Added package.json Support to Deno

A post on [Deno](https://swe.quest/sources/deno.md), published 2023-03-20, 6 min read, Opinion. Original: [https://deno.com/blog/package-json-support](https://deno.com/blog/package-json-support)

## Summary

Deno added package.json support because its HTTP-import module system, though decentralized and manifest-free, suffers from the Duplicate Dependency Problem, the clunky deps.ts pattern, non-composable import maps, and the limits of transpile servers like esm.sh. Bare specifiers with semver resolution solve deduplication, so Deno now runs existing Node projects while keeping safeguards such as node: prefixes, no arbitrary post-install scripts and permission enforcement. The next major release plans a deno: URL scheme with semver resolution (e.g. deno:oak@12) and encourages import maps in deno.json that mix deno: and npm: specifiers.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)

## Prerequisites

- JavaScript ES modules ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- npm and package.json
- semantic versioning

## Keywords

Deno, package.json, npm, import maps, bare specifiers, DNT, esm.sh, deno.land

## Related posts

- [What we got wrong about HTTP imports](https://swe.quest/articles/what-we-got-wrong-about-http-imports-313ba3cefc7f7089.md): Deno · 2024-07-29 · Easy · 6 min read · JavaScript, Build systems, TypeScript
  Deno's original module system of direct HTTP URL imports didn't scale.
- [If you're not using npm specifiers, you're doing it wrong](https://swe.quest/articles/if-you-re-not-using-npm-specifiers-you-re-doing-it-wrong-1ef0f76947ddfda3.md): Deno · 2025-02-13 · Medium · 7 min read · JavaScript, TypeScript, Build systems, Supply chain security
  Deno now recommends importing npm packages with native \`npm:\` specifiers instead of HTTP transpile services like esm.sh or unpkg.
- [Deno 1.31: package.json support](https://swe.quest/articles/deno-1-31-package-json-support-f898dc927dbf9d75.md): Deno · 2023-02-24 · Medium · 8 min read · Runtimes & VMs, JavaScript, TypeScript, Build systems
  Deno 1.31 adds automatic package.json detection, so dependencies resolve from bare specifiers and package.json scripts run via deno task (simple scripts only for now).
- [Introducing your new JavaScript package manager: Deno](https://swe.quest/articles/introducing-your-new-javascript-package-manager-deno-23f4f8f8933d6ca1.md): Deno · 2024-11-08 · Medium · 4 min read · JavaScript, Build systems, Developer tools, Supply chain security
  Deno 2 adds \`deno add\`, \`deno remove\`/\`uninstall\`, and \`deno install\` subcommands that manage npm and JSR dependencies in either \`deno.json\` import maps or an existing \`package.json\`, so they work inside Node projects too.
- [Deno 1.28: Featuring 1.3 Million New Modules](https://swe.quest/articles/deno-1-28-featuring-1-3-million-new-modules-2730b24ac8878c7c.md): Deno · 2022-11-14 · Medium · 6 min read · JavaScript, Supply chain security, Runtimes & VMs
  Deno 1.28 stabilizes npm compatibility, letting programs import any of npm's 1.3 million packages via \`npm:\` specifiers in imports or import maps, and run npm CLIs with \`deno run npm:\<pkg\>\`, with no package.json, install step or node\_modules folder by default.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
