title: Cannot run node: No such file or directory
body: <p>I execute <code>mvn clean install</code> inside a docker container from image <code>maven:3-alpine</code> to build the application. In the pom.xml I make use of the <code>frontend-maven-plugin</code> because I need to install <code>node</code> and <code>npm</code> and then run <code>npm install</code> to build the frontend (angular).</p>
  
  <pre><code> &lt;plugin&gt;
          &lt;groupId&gt;com.github.eirslett&lt;/groupId&gt;
          &lt;artifactId&gt;frontend-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.9.1&lt;/version&gt;
          &lt;configuration&gt;
            &lt;nodeVersion&gt;v12.16.1&lt;/nodeVersion&gt;
          &lt;/configuration&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;install node and npm&lt;/id&gt;
              &lt;goals&gt;
                &lt;goal&gt;install-node-and-npm&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;phase&gt;generate-resources&lt;/phase&gt;
            &lt;/execution&gt;
            &lt;execution&gt;
              &lt;id&gt;npm install&lt;/id&gt;
              &lt;goals&gt;
                &lt;goal&gt;npm&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;phase&gt;generate-resources&lt;/phase&gt;
              &lt;configuration&gt;
                &lt;arguments&gt;install&lt;/arguments&gt;
                &lt;installDirectory&gt;./&lt;/installDirectory&gt;
              &lt;/configuration&gt;
            &lt;/execution&gt;
            &lt;execution&gt;
              &lt;id&gt;ng build&lt;/id&gt;
              &lt;goals&gt;
                &lt;goal&gt;npm&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;phase&gt;compile&lt;/phase&gt;
              &lt;configuration&gt;
                &lt;arguments&gt;run-script build&lt;/arguments&gt;
              &lt;/configuration&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
  </code></pre>
  
  <p>Node and npm will be installed correctly but when it runs <code>npm install</code> it returns an error: <code>Failed to run task: 'npm install' failed. java.io.IOException: Cannot run program "/var/lib/jenkins/workspace/myProject/node/node" (in directory "/var/lib/jenkins/workspace/myProject"): error=2, No such file or directory -&gt; [Help 1]</code></p>
  
  <p>If I enter into the container (docker exec) and try to run manually npm install it gives me again the same error. When I check if node is correctly installed then I see the file <code>/var/lib/jenkins/workspace/myProject/node/node</code> is there but when I try to run node from inside the /node directory myself, let's say <code>node -v</code> it says me again <code>No such file or directory</code>. I don't understand why it is happening, because node is there!! The current user has also the right to execute this file.</p>
  
  <p>I did some search about the problem, some people say that installing node on ubuntu in this way is not the correct way but that happens only in my container. If I try the same on my local machine (it is also an ubuntu) then node works.</p>