From ac383c763215cf1e81fa2282007bd25970bfc07f Mon Sep 17 00:00:00 2001 From: FarhanYaseen Date: Tue, 16 Oct 2018 03:01:41 +0500 Subject: [PATCH] Added npm list for local modules (#19210) * Added npm list for local modules Added npm list command to list locally installed modules * Update index.md --- client/src/pages/guide/english/nodejs/npm/index.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/pages/guide/english/nodejs/npm/index.md b/client/src/pages/guide/english/nodejs/npm/index.md index 4f8891da37..3c22e055a3 100644 --- a/client/src/pages/guide/english/nodejs/npm/index.md +++ b/client/src/pages/guide/english/nodejs/npm/index.md @@ -79,6 +79,13 @@ Local modules are further divided into two types of depenedencies: `devDepenedne A nice shorthand for installing a devDependency that I like to use is `npm i -D`. The shorthand for saving a regular dependency is `-S` instead of `-D`. +We can list the local packages we have installed locally with the npm list command. +```js +$ npm list --depth=0 +/usr/local/someDirectory +└── express@4.16.4 +``` + ### Installing a Specific Version of a Package To do so, we mention the package version we want to install.