question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot download node - 404

See original GitHub issue

I am using the frontend-maven-plugin to install node. Unfortunatly I get following exception while building.

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.0:install-node-and-npm (install node and npm) on project frontend: **Could not download Node.js: Got error code 404 from the server.** -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.0:install-node-and-npm (install node and npm) on project frontend: Could not download Node.js: Got error code 404 from the server. at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) ...

The URL of the node root ist correct and can be downloaded manually by me:

   [INFO] Found proxies: [xxx-proxy{protocol='http', host='proxy.xxx', port=8080, nonProxyHosts='*.xxx'}]
   [INFO] Installing node version v12.9.1
   [INFO] Downloading http://nodejs.org/dist/v12.9.1/node-v12.9.1-linux-x64.tar.gz to /home/myname/.m2/repository/com/github/eirslett/node/12.9.1/node-12.9.1-linux-x64.tar.gz
   [INFO] Downloading via proxy xxx-proxy{protocol='http', host='proxy.xxx', port=8080, nonProxyHosts='*.xxx'}`

This is my maven setting:

    <plugin>
                   <groupId>com.github.eirslett</groupId>
                   <artifactId>frontend-maven-plugin</artifactId>
                  <version>1.11.0</version>
                   <configuration>
                       <nodeVersion>v12.9.1</nodeVersion>
                       <npmVersion>5.6.0</npmVersion>
                       <workingDirectory>src/main/resources/cmdbui/</workingDirectory>
                       <installDirectory>target/tmp</installDirectory>
                   </configuration>
                   <executions>
                       <execution>
                           <id>install node and npm</id>
                           <goals>
                               <goal>install-node-and-npm</goal>
                           </goals>
                       </execution>
                       <execution>
                           <id>npm install</id>
                           <goals>
                               <goal>npm</goal>
                           </goals>
                       </execution>
                       <execution>
                           <id>npm run build</id>
                           <goals>
                               <goal>npm</goal>
                           </goals>
                           <configuration>
                               <arguments>run build</arguments>
                           </configuration>
                       </execution>
                       <execution>
                           <id>prod</id>
                           <goals>
                               <goal>npm</goal>
                           </goals>
                           <configuration>
                               <arguments>run-script build</arguments>
                           </configuration>
                           <phase>generate-resources</phase>
                       </execution>
                   </executions>
               </plugin>

In my maven settings.xml our corp. proxy is also set

   <proxy>  
       <id>xxx-proxy</id>  
        <active>true</active>    
        <protocol>http</protocol>     
        <host>proxy.xxx</host>
        <port>8080</port>
        <nonProxyHosts>*.xxx</nonProxyHosts>
  </proxy>

So the plugin should use the proxy correctly given my the maven settings, but still I cannot download node.

EDIT: I use Linux. I do not have installed node on my machine manually

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:22 (7 by maintainers)

github_iconTop GitHub Comments

40reactions
eirslettcommented, Jan 18, 2021

@jowin-yip-TR with the M1 you need to use version 1.11.0 (or newer) of this plugin.

5reactions
AshishKapoorcommented, Jan 27, 2021

@jowin-yip-TR with the M1 you need to use version 1.11.0 (or newer) of this plugin.

This worked for me on my M1 mac.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot download node-sass HTTP error 404 Not found
I am working on a project for an internship on Angular and after trying to install a few modules from NgPrime I m...
Read more >
Node-sass Cannot download HTTP error 404 Not Found
This problem occurs when I was trying to install node-sass@3.13.1 or any older version of node-sass with a newer version of node and...
Read more >
Solved: M1 Mac, cant build wknd tutorial, get "Could not d...
M1 Mac, cant build wknd tutorial, get "Could not download Node.js: Got error code 404 from the server.".
Read more >
Problem to install node-sass HTTP error 404 Not Found
I searched and I found this page Cannot download "https://github.com/sass/node-sass/releases/download/v4.13.0/win32-x64-79_binding.node" ...
Read more >
npm install error HTTP error 404 Not Found while using gulp ...
... Cannot download "https://github.com/sass/node-sass/releases/download/v4.10.0/win32-x64-72_binding.node": HTTP error 404 Not Found Hint: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found