Cannot download node - 404
See original GitHub issueI 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:
- Created 3 years ago
- Reactions:1
- Comments:22 (7 by maintainers)
Top GitHub Comments
@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!