I have a fresh installation of Jenkins 2.46.1 with Docker and I'm having issues to have NodeJS running and I can't find any answer that puts me in the correct path to fix this.

       

      How I did my setup:

       

      • Install jenkins
        • docker create -v /var/jenkins_home --name jenkins-dv jenkinsci/blueocean:latest
        • docker run -d -p 8080:8080 --volumes-from jenkins-dv --name company-jenkins jenkinsci/blueocean:latest
      • Installed NodeJS Plugin 1.2.1
      • Configured NodeJS tool with the following:
        • name: node6
        • version: nodejs 6.10.3
        • global npm packages: yarn
      • Created the attached Jenkinsfile in my repository
      • Create a Multibranch Pipeline

       

      When I run a build in a branch I get the following output: https://pastebin.com/BUTJLnVp

       

      As you can see it fails immediately in the (Declarative: Tool Install) stage while trying to install yarn globally with "env: ‘node’: No such file or directory" and in the following stages I get: "script.sh: line 1: node: not found"

       

      I feel like this is such a common scenario that should be super easy to setup, and I'm having a really hard time to setup this simple part.

      Where I might have gone wrong? Or is this a known issue?

          [JENKINS-44091] Use NodeJS in Pipeline

          Did a local installation of 2.46.2 using apt-get and this issue does not occur. So I assume this is either something related with 2.46.1 or with the docker image.

          Ricardo Canastro added a comment - Did a local installation of 2.46.2 using apt-get and this issue does not occur. So I assume this is either something related with 2.46.1 or with the docker image.

          Nikolas Falco added a comment -

          Seems it's the docker image that maybe has the envInject plugin installed that has a know bug.

          Anyway read the posts in the duplicated issue for a workaround due docker / envinject plugin bugs

          Nikolas Falco added a comment - Seems it's the docker image that maybe has the envInject plugin installed that has a know bug. Anyway read the posts in the duplicated issue for a workaround due docker / envinject plugin bugs

            nfalco Nikolas Falco
            canastro Ricardo Canastro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: