by Sai gowtham

Viewing the dependency tree of a npm package without installing

In this tutorial, we are going to learn about how to view the dependency tree of a npm package or module before installing it locally or globally in our system.

Viewing the dependency tree

We can view the dependency tree of any npm package before installing it, by using the npm-remote-ls package.

Run the below command to install it globally:

npm install npm-remote-ls -g

In macOs, you need to add sudo before the above command.

Now, you can view the dependency tree of an npm package like this:

npm-remote-ls react

Output:

➜  ~ npm-remote-ls react
└─ react@16.13.1
   ├─ object-assign@4.1.1
   ├─ prop-types@15.7.2
   │  ├─ loose-envify@1.4.0
   │  │  └─ js-tokens@4.0.0
   │  ├─ object-assign@4.1.1
   │  └─ react-is@16.13.1
   └─ loose-envify@1.4.0

You can view the dependency tree for the specific version of an npm package like this:

npm-remote-ls react@15

Similarly, if you are using the npm version 5.2 or greater you view it using npx, no need of installing the npm-remote-ls package globally.

npx npm-remote-ls express

You can also check out, How the view the dependency tree of installed npm packages.

Css Tutorials & Demos

How rotate an image continuously in CSS

In this demo, we are going to learn about how to rotate an image continuously using the css animations.

How to create a Instagram login Page

In this demo, i will show you how to create a instagram login page using html and css.

How to create a pulse animation in CSS

In this demo, i will show you how to create a pulse animation using css.

Creating a snowfall animation using css and JavaScript

In this demo, i will show you how to create a snow fall animation using css and JavaScript.

Top Udemy Courses

JavaScript - The Complete Guide 2021 (Beginner + Advanced)
JavaScript - The Complete Guide 2021 (Beginner + Advanced)
64,026 students enrolled
52 hours of video content
View Course
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
284,472 students enrolled
40 hours of video content
View Course
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
152,857 students enrolled
48.5 hours of video content
View Course