sous-chefs/nodejs

NPM CLI is deprecating -global

Opened this issue · 1 comments

🗣️ 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

❔ Possible Solution

Update helper to use --location=global instead

⤴️ Describe alternatives you've considered

Pinning to specific NPM CLI version, but that's short-sighted

➕ Additional context

npm/cli@8898710

Another option is to pass environment along so the npm list can better/properly mimic what npm install will eventually do.