"Global npm packages to install" doesn't work behind a proxy

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Critical
    • Component/s: nodejs-plugin
    • None
    • Environment:
      RHEL 7.1
      Jenkins 2.32.1
      NodeJS plugin 1.1.0

      Hello !
      I would like to install bower as global package (field "Global npm packages to install" in the "Global Tool Configuration").
      Error :
      ..............
      npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
      npm ERR! network This is most likely not a problem with npm itself
      npm ERR! network and is related to network connectivity.
      npm ERR! network In most cases you are behind a proxy or have bad network settings.
      npm ERR! network
      npm ERR! network If you are behind a proxy, please make sure that the
      npm ERR! network 'proxy' config is set properly. See: 'npm help config'
      ............

      I tried to create a "NPM config file" in "Config File Management", with this content :
      proxy=http://<proxy>:<port>/
      https-proxy=http://<proxy><port>/
      and using it in my job --> still error

      The only way to have bower install globally behind the proxy is to use this "NPM config file" and to use the shell command "npm install -g bower"

      It's not blocking but uncomfortable because Jenkins will try to install bower at each job use.

      Thanks

            Assignee:
            Unassigned
            Reporter:
            Christophe Pessereau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: