Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Latest commit

 

History

History
25 lines (19 loc) · 1.1 KB

node.md

File metadata and controls

25 lines (19 loc) · 1.1 KB

Interoperating with Node.js and npm

Though Deno is powerful, many people will want to leverage code and libraries that are built for Node, in particular the large set of packages available on the npm registry.

There are currently two ways to do this:

We recommend npm specifiers, but they are a new feature, and although stabilized, they are still a work in progress. If you run into issues, you can always fall back to using a CDN.

Some other scenarios you may run into covered in this chapter:

  • If you are trying to use your own or private code that was written for Node, use the std/node modules of the Deno standard library to "polyfill" the built-in modules of Node.
  • If you want to use "bare specifiers" (specifiers without an absolute or relative path to them), you can use import maps to map the bare specifiers to packages in Deno without needing to use a package manager.