I've installed node.js in my computer and when i run this command it gives me this error what can i do ???
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
I've installed node.js in my computer and when i run this command it gives me this error what can i do ???
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
The old way of installing a package globally/locally has changed to `--location=global/local instead of -g/-l
So let's say you want to install the create-react-app package globally you should do this:
npm install --location=global create-react-app
I work on npm v8.11.0 and node v16.15.1.
I've got warning as you:
npm WARN config global
--global,--localare deprecated. Use--location=globalinstead
But now I am done following this:
C:\Program Files\nodejs\npm.cmd edit **prefix -g** to **prefix --location=global**
C:\Program Files\nodejsnpm.cmdprefix -g with prefix --location=global, and Savenpx.cmdCheck if the problem is fixed
If it is not working, update npm using npm install npm@latest -g and repeat the step on the new version if required.