nodejs
nodejs copied to clipboard
NPM CLI is deprecating -global
:speaking_head: Foreword
Debated on this being "Feature request" or "Bug"
NPM has been talking about deprecating -global
- this cookbook needs to account for that.
😦 Problem Statement
Recent releases of NPM CLI have fulfilled the deprecation - causing helper to fail since it prints the deprecation warning to stderr https://github.com/sous-chefs/nodejs/blob/main/libraries/nodejs_helper.rb#L25
Luckily NPM has reverted it, but not before some damage done : https://github.com/npm/cli/releases/tag/v8.12.1
:grey_question: Possible Solution
Update helper to use --location=global
instead
:arrow_heading_up: Describe alternatives you've considered
Pinning to specific NPM CLI version, but that's short-sighted
:heavy_plus_sign: Additional context
https://github.com/npm/cli/commit/8898710220a3d84b0a9ea2a6d9cf880e50b94c9e
Another option is to pass environment
along so the npm list
can better/properly mimic what npm install
will eventually do.