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

NodeJS plugin unable to install global NPM packages

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • nodejs-plugin
    • None
    • Official Jenkins Docker - version 2.3 (Alpine)

      Plugins:
       - NodeJS 0.2.1
       - Pipeline 2.1

      Browser: Chrome 50.0.2661

      Added NodeJS Tool 6.1.0 as "Install from nodejs.org"

      When attempting to add the tool to a pipeline with automatic installation of NPM modules the following error occurred:

      Unpacking https://nodejs.org/dist/v6.1.0/node-v6.1.0-linux-x64.tar.gz to /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/node-6.1.0 on Jenkins
      $ /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/node-6.1.0/bin/npm install -g grunt-cli bower
      env: can't execute 'node': No such file or directory

          [JENKINS-34815] NodeJS plugin unable to install global NPM packages

          I can confirm this behaviour.

          My workaround is, to add a Build-step "Execute shell" to each needed Jenkins-Job, as soon as possible in the build-pipeline, containing

          npm update
          npm install --global grunt
          

          Markus Schulte added a comment - I can confirm this behaviour. My workaround is, to add a Build-step "Execute shell" to each needed Jenkins-Job, as soon as possible in the build-pipeline, containing npm update npm install --global grunt

          I can confirm that it correctly works for NodeJS < 6.0. Just tested it with 5.12.0.

          Davi Koscianski Vidal added a comment - I can confirm that it correctly works for NodeJS < 6.0. Just tested it with 5.12.0.

          I just manually built and installed 0.3 and it works.

          Davi Koscianski Vidal added a comment - I just manually built and installed 0.3 and it works.

          Davi Koscianski Vidal added a comment - - edited

          No signus. I cloned nodejs-plugin repository, built the plugin using maven and uploaded the resulting hpi. The built resulted in nodejs-plugin version 0.3.
          With this up-to-date version I was able to install NodeJS 6.3.0 + global packages.

          Edit: sorry for my poor English.

          Davi Koscianski Vidal added a comment - - edited No signus . I cloned nodejs-plugin repository, built the plugin using maven and uploaded the resulting hpi. The built resulted in nodejs-plugin version 0.3. With this up-to-date version I was able to install NodeJS 6.3.0 + global packages. Edit: sorry for my poor English.

          +1

          With current docker jenkins:2.32.1-alpine and plugin nodejs:1.0 this happens again, when using node 7.4:
          Alpine just can't run the binary even if it is found in PATH and is executable:

          + /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/nodejs7/bin/node -v
          
          /var/jenkins_home/jobs/busx1/workspace@tmp/durable-a76d6fd5/script.sh: line 1: /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/nodejs7/bin/node: not found
          
          script returned exit code 127
          

          Unpacking https://nodejs.org/dist/v7.4.0/node-v7.4.0-linux-x64.tar.gz to /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/nodejs7 on Jenkins
          This happens because the image doesn't contain libstdc++.so.6 as needed by nodejs:

                  /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000)
                  libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000)
                  librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000)
          Error loading shared library libstdc++.so.6: No such file or directory (needed by /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/nodejs7/bin/node)
                  libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000)
                  libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f0ac773e000)
                  libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000)
                  libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000)
          

          Sebastian Wagner added a comment - With current docker jenkins:2.32.1-alpine and plugin nodejs:1.0 this happens again, when using node 7.4: Alpine just can't run the binary even if it is found in PATH and is executable: + / var /jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/nodejs7/bin/node -v / var /jenkins_home/jobs/busx1/workspace@tmp/durable-a76d6fd5/script.sh: line 1: / var /jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/nodejs7/bin/node: not found script returned exit code 127 Unpacking https://nodejs.org/dist/v7.4.0/node-v7.4.0-linux-x64.tar.gz to /var/jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/nodejs7 on Jenkins This happens because the image doesn't contain libstdc++.so.6 as needed by nodejs: /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000) libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000) librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000) Error loading shared library libstdc++.so.6: No such file or directory (needed by / var /jenkins_home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/nodejs7/bin/node) libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f0ac773e000) libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000) libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x55ae0ad53000)

            Unassigned Unassigned
            wwhurley William Hurley
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: