Skip to content

Zowe CLI plugins update does not respect custom registry used in ~/.npmrc #2749

Description

@roman-kupriyanov

Describe the bug

When using zowe plugins update @broadcom/endevor-for-zowe-cli command it shows this error:

❯ zowe plugins update @broadcom/endevor-for-zowe-cli
Unable to perform this operation due to the following problem.
Errors occurred in this program: /usr/local/bin/npm

Diagnostic Information
Command that failed:
    /usr/local/bin/npm install @broadcom/endevor-for-zowe-cli -g --legacy-peer-deps --prefix /Users/user/.zowe/plugins/installed --registry https://registry.npmjs.org/
Exit code = 1

Command's standard error stream:
npm error code ECONNRESET
npm error syscall read
npm error errno ECONNRESET
npm error network request to https://registry.npmjs.org/@broadcom%2fendevor-for-zowe-cli failed, reason: read ECONNRESET
npm error network This is a problem related to network connectivity.
npm error network In most cases you are behind a proxy or have bad network settings.
npm error network
npm error network If you are behind a proxy, please make sure that the 'proxy' config is set properly.  See: 'npm help config'
npm error A complete log of this run can be found in: /Users/user/.npm/_logs/2026-06-17T09_40_59_782Z-debug-0.log

If you are using an NPM registry, confirm that NPM can access the registry with the following command:
    npm view <your_desired_package_name>
Confirm that NPM can download your package from your registry:
    npm pack <your_desired_package_name>

We have registry.npmjs.org blocked in the corporate network and using Artifactory to proxy the registry access. For that I have .npmrc in my home directory:

❯ cat ~/.npmrc                                                           
registry=https://artifactory.net/npm
//artifactory.net/npm/:_authToken=<redacted_token>

But it seems that it is ignored completely, even though Zowe CLI clearly uses NPM to upgrade the plugins.

On the other hand, setting the registry explicitly works:

❯ zowe plugins update @broadcom/endevor-for-zowe-cli --registry='https://artifactory.net/npm'
Update of the npm package(@broadcom/endevor-for-zowe-cli) was successful.

Expected and actual results

It is expected that Zowe CLI follows the establish Nodejs platform settings for the specific user if it uses NPM to manage the plugin installation/upgrade (it even shows that NPM is configured to use a different registry in zowe config re output).

Describe your environment

❯ zowe config re  
______________________________________________
Zowe CLI version = 8.32.2
Node.js version = 22.22.3
O.S. platform = darwin
O.S. architecture = x64
Zowe daemon mode: off

ZOWE_CLI_HOME = undefined
    Default = /Users/user/.zowe
ZOWE_APP_LOG_LEVEL = undefined
ZOWE_IMPERATIVE_LOG_LEVEL = undefined
No other 'ZOWE_' variables have been set.

______________________________________________
NPM information:
    
    NPM version = 11.17.0
    Shell = /bin/zsh
    Global prefix = /usr/local
        The directory above contains the Zowe Node.js command script.
    Global root node modules = /usr/local/lib/node_modules
    Global config = /usr/local/etc/npmrc
    Local prefix = /Users/user
    Local root node modules = /Users/user/node_modules
    User config = /Users/user/.npmrc
    
    registry = "https://artifactory.net/npm"
    node bin location = /usr/local/bin/node
    cwd = /Users/user
    HOME = /Users/user

Additional context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-lowLegit issue but cosmetic or nice-to-haveseverity-lowBug that makes the usage of the Zowe less convenient but doesn't impact key use cases

    Type

    No type

    Projects

    Status
    Low Priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions