From 300b6dd1e791111bf01fae5a189155beeb946a08 Mon Sep 17 00:00:00 2001 From: Guy Khmelnitsky <3136012+GuyKh@users.noreply.github.com> Date: Sun, 2 Oct 2022 14:59:14 +0300 Subject: [PATCH] Add npm install docs (#2006) * Update 101-global-install-vs-local-install.md * Update content/roadmaps/107-nodejs/content/102-nodejs-npm/101-global-install-vs-local-install.md Co-authored-by: Kamran Ahmed --- .../101-global-install-vs-local-install.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/content/roadmaps/107-nodejs/content/102-nodejs-npm/101-global-install-vs-local-install.md b/content/roadmaps/107-nodejs/content/102-nodejs-npm/101-global-install-vs-local-install.md index 2280b5bd9..e3b435a9c 100644 --- a/content/roadmaps/107-nodejs/content/102-nodejs-npm/101-global-install-vs-local-install.md +++ b/content/roadmaps/107-nodejs/content/102-nodejs-npm/101-global-install-vs-local-install.md @@ -1 +1,9 @@ -# Global install vs local install \ No newline at end of file +# Global Install vs Local Install + +NodeJS and NPM allow two methods of installing dependencies/packages: Local and Global. This is mainly used when adding a package or dependency as part of a specific project you're working on. The package would be installed (with its dependencies) in `node_modules` folder **under your project**. In addition, in `package.json` file there will be a new line added for the installed dependency under the label `dependencies`. +At this point - you can start using the package in your NodeJS code by importing the package. + +Unlike the local install, you can install packages and dependencies **globally**. This would install it in a system path, and these packages would be available to any program which runs on **this specific** computer. This method is often used for installing command line tools (for example, even `npm` program is a Globally installed npm package). + +Free Content +NPM Install Docs