help
help copied to clipboard
local vs global
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.
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).
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.
Closing after no activity on this issue for 12 months.