Interoperating with Node and NPM

While Deno is pretty powerful itself, 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. In this chapter, we will explore how.

⚠️ Starting with v1.15 Deno provides a compatibility mode, that allows to emulate Node environment and consume code authored for Node directly. See Node compatibility mode chapter for details.

The good news is that in many cases, it just works.

There are some foundational things to understand about differences between Node and Deno that can help in understanding what challenges might be faced:

In order to help mitigate these differences, we will further explore in this chapter:

That being said, some differences cannot be overcome: