With Deno 2, we’ve introduced several subcommands to simplify dependency management: deno add, deno remove, and deno install. These commands will fe

Introducing your new JavaScript package manager: Deno

submited by
Style Pass
2024-11-08 18:00:14

With Deno 2, we’ve introduced several subcommands to simplify dependency management: deno add, deno remove, and deno install. These commands will feel familiar to Node users, but offer greater flexibility, allowing you to import npm and JSR packages seamlessly — even within Node projects.

In this post, we’ll cover how to manage packages with Deno’s tooling, whether you’re working with npm, JSR, or projects that have a package.json. We’ll also look at how its performance stacks up against other package managers:

With backwards compatibility with Node/npm, built-in package management, all-in-one zero-config toolchain, and native TypeScript and web API support, writing JavaScript has never been simpler.

In projects with a package.json, npm modules will be added there instead. The command above would add "chalk": "^5.3.0" to package.json while deno.json holds JSR dependencies.

deno remove deletes dependencies from deno.json and package.json. deno uninstall is an alias for this command. Here’s an example:

Leave a Comment