help icon indicating copy to clipboard operation
help copied to clipboard

local vs global

Open Solodolofolobolo opened this issue 3 years ago • 1 comments

Details

I i type npm -v into my command prompt it keeps giving me this : npm WARN config global --global, --local are deprecated. Use --location=global instead.

Node.js version

Not applicable.

Example code

No response

Operating system

windows 10

Scope

n/a

Module and version

Not applicable.

Solodolofolobolo avatar Jun 15 '22 01:06 Solodolofolobolo

NPM's 8.11.x versions have deprecated the --global and --local flags from the CLI, but the deprecations have been lifted on the 8.12.x versions and higher, so I would recommend updating to the latest version of the NPM CLI by running:

$ npm i -g npm

As for the difference, the global location refers to the NPM packages that are installed globally with the --global flag, and the local location refers to the NPM packages that are installed locally (for example in one of your projects).

VoltrexKeyva avatar Jun 15 '22 09:06 VoltrexKeyva

There has been no activity on this issue for 11 months. The help repository works best when sustained engagement moves conversation forward. The issue will be closed in 1 month. If you are still experiencing this issue on the latest supported versions of Node.js, please leave a comment.

github-actions[bot] avatar Feb 04 '24 01:02 github-actions[bot]

Closing after no activity on this issue for 12 months.

github-actions[bot] avatar Mar 06 '24 01:03 github-actions[bot]