Categories: GeneralIT knowledge

What is the difference between ‘Local installation’ and ‘Global installation’?Knowledge in 3 minutes

When installing packages using the npm command, which manages Nod.js libraries and packages, there are two concepts: local installation and global installation.

The installation location differs between local installation and global installation.

In this article, I would like to explain the difference between local installation and global installation.

What is local installation?

Install packages for each project. This allows version control of libraries, etc. for each project.

Local installation requires passing through the path after installation.

An example of a local install command is shown below

npm install --save-dev <package name>

What is Global installation?

The installation will be performed at the location where the path leads to. For this reason, global installation is suitable for commands that are commonly used in all projects.

Examples of global install commands are

sudo npm install --global <package name>

However, global installations naturally do not allow for version switching from one project to another. Also, some projects may stop working due to version upgrades, etc.

This is a 3-minute explanation of local and global installation with npm.



Test-Hack

Share
Published by
Test-Hack

Recent Posts

“Seven Basic Tools of Quality Control” for Web App tester

"Seven Basic Tools of Quality Control" Difference between “New” and “Old" "Seven Basic Tools of…

2 months ago

How to Postman environment variable settings. Knowledge in 3 minutes

This article uses Postman for Mac , Version 10.0.32 In Postman, it is useful to…

5 months ago

What is Edge AI? Knowledge in 3 minute

First, what is Edge Computing? Before understanding Edge AI, it is helpful to first understand…

5 months ago

What does usability testing do? Knowledge in 3 minute

Usability Testing is described in the ISQB Glossary as follows Usability TestingTesting to evaluate the…

5 months ago

What is “Shift-left” ? Knowledge in 3 minutes

Do you understand what the term "shift-left" means?In this article, we will explain "What is…

5 months ago

What is “Inception deck” ? Knowledge in 3 minutes

What is "Inception deck" ? Inception Deck is one of the practices of Agile development…

5 months ago