frontend-maven-plugin: Cannot download node - 404
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
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 26 (7 by maintainers)
Commits related to this issue
- Bump up frontend-maven-plugin Upgrade needed to be able to build pinot-controller on mac M1 https://github.com/eirslett/frontend-maven-plugin/issues/952#issuecomment-762163294 — committed to saurabhd336/pinot by saurabhd336 2 years ago
- Bump up frontend-maven-plugin (#8461) Upgrade needed to be able to build pinot-controller on mac M1 https://github.com/eirslett/frontend-maven-plugin/issues/952#issuecomment-762163294 — committed to apache/pinot by saurabhd336 2 years ago
- Bump up maven frontend plugin for m1 arm support ### What changes are proposed in this pull request? Bump up maven frontend plugin to fix the "cannot download node.js" issues on osx m1. See the disc... — committed to Alluxio/alluxio by beinan 2 years ago
- Bump up maven frontend plugin for m1 arm support ### What changes are proposed in this pull request? Bump up maven frontend plugin to fix the "cannot download node.js" issues on osx m1. See the disc... — committed to jja725/alluxio by beinan 2 years ago
@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!
Just in case someone’s done the same stupid mistake I did:
I forgot to add the “v” to the version number, so currently the latest LTS should be v16.13.2 - not 16.13.2 like I did 😃
@RomChig try using the newest version of the plugin.
@eirslett I using M1 Mac and it tries to download https://nodejs.org/dist/v10.15.3/node-v10.15.3-darwin-arm64.tar.gz which is 404.
@MunsMan which Mac do you run (The new M1?) Which version of the frontend-maven-plugin, and versions of Node and npm is specified in the pom.xml file?
I have the same Issue on Mac and I have Node installed on my system. I face this problem with or without a specific proxy.
@eirslett It is invalid for my windows. Following is my configuration, i have used mirror of taobao.
I use the following configuration
with values
It is configurable because on some projects, we use a proxy / cache but not in this project.