asdf-nodejs icon indicating copy to clipboard operation
asdf-nodejs copied to clipboard

npm warns about `--global` deprecation

Open ProspectPyxis opened this issue 3 years ago • 1 comments

When this plugin is installing packages from .default-npm-packages, it uses the -g flag. However, in new versions of npm, this gives a deprecation warning:

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

Looking at the source of this plugin, this should be an easy fix - I'm more worried about whether swapping flags here would be a breaking change for older npm versions?

ProspectPyxis avatar Jun 09 '22 06:06 ProspectPyxis

This is a hard one, we still want to support older versions of npm, so I'm leaning towards keeping it until we have a true breakage in NPM's API. After that the way only would to do it would be to probably change the command conditionally, depending on the current version of npm

augustobmoura avatar Sep 02 '22 03:09 augustobmoura