Skip to content

[BUG] npm config set noproxy - obj[key].join is not a function #3506

@twigy11

Description

@twigy11

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

since [email protected] when executing npm config set noproxy "stringparameter" throw obj[key].join is not a function exception.

This happens because the noproxy array default value is overwritten by the string, which one doesn't have the join function

this is the noproxy flatten function result

param noproxy [ '' ]
obj[Key] [ '' ]
param noproxy [ '' ]
obj[Key] [ '' ]
param noproxy Banana
obj[Key] Banana

I've downgraded the versión until 7.15.x. This is the last version working

Expected Behavior

the noproxy config variable set the new value

Steps To Reproduce

  1. node14.17.1 and npm 7.19
  2. default
  3. Run npm config set noproxy "localhost"
  4. obj[key].join is not a function exception.

Environment

  • OS: Ubuntu 20.04
  • Node: 14.17.1
  • npm: 7.19.0

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 2secondary priority issueRelease 7.xwork is associated with a specific npm 7 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions