Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70078

npm config is not compatible with npm version 9+

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • nodejs-plugin
    • None
    • 1.6.0

      Private registries with authentication require a special configuration since npm version 9.

      In npm version 6 the npmrc looks like this:

      registry = https://some.private.registry/api/npm/my-npm-repo/
      _auth = 3489034someHashwfhdsd87
      

      In npm version 9, the key _auth must be mapped to a specific registry:

      registry = https://some.private.registry/api/npm/my-npm-repo/
      //some.private.registry/api/npm/my-npm-repo/:_auth = 3489034someHashwfhdsd87
      

      npm version 8 is still compatible with the old configuration format, but a warning appears in the logs:

      npm WARN config `_auth`, `_authToken`, `username` and `_password` must be scoped to a registry. see `npm help npmrc` for more information.
      

      The nodejs-plugin currently lacks support for the new configuration format.

            nfalco Nikolas Falco
            shoelzle Stefan Hölzle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: