Suggest an editImprove this articleRefine the answer for “How does a local install differ from a global one?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**A local install** puts a package *inside a specific project*, in the `node_modules` folder next to `package.json`. **A global install** puts a package *at the system level*, so it is available from any project as a CLI tool. **Key point:** a local install is for project dependencies, a global install is for tools you need to run from anywhere on the system.Shown above the full answer for quick recall.Answer (EN)Image**A local install** puts a package *inside a specific project*, in the `node_modules` folder next to `package.json`. **A global install** puts a package *at the system level*, so it is available from any project as a CLI tool. --- ### **Local install** ```bash npm install <package> ``` - The package is stored in `./node_modules` - An entry is added to `dependencies` or `devDependencies` - Available only inside this project - Used for libraries the application needs at runtime or build time (React, Webpack, Axios, etc.) --- ### **Global install** ```bash npm install -g <package> ``` - The package is installed into npm's system directory - Not available as a project dependency - Can be invoked as a terminal command from any directory - Usually used for CLI utilities (for example: `nodemon`, `npm-check`, `create-react-app`) --- ### **Comparison** | Trait | Local | Global | |---|---|---| | Where it installs | Into the project (`node_modules`) | Into the system | | Visibility | Only in the project | For all projects | | Entry in package.json | Yes | No | | What it suits | Project libraries | CLI tools | --- **Short summary:** a local install is for project dependencies, a global install is for tools you need to run from anywhere on the system.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.