Closed Matdarich closed 3 years ago
Maybe the proxy doesn't have an opening to download from http://nodejs.org/dist/v12.9.1/node-v12.9.1-linux-x64.tar.gz ? That URL works when I try it in my browser, without a proxy.
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.
@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 solved the problem on my machine. It was an invalid setting of the proxy. So no issue of the plugin. Sorry. Thanks for the your help.
@eirslett No, it is an Intel based from 2015. I rebuild my application und I'm running docker now. I will probably give it a try later again and if I still face the issue, I can reopen this one. Thanks for the fast response.
Yes, I specified the node and rpm version and I tried using yarn as well. I tried the latest version of your Plugin. It is likely that the mistake was on my side. I don't use maven that often.
@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.
[INFO] Installing node version v10.15.3
[INFO] Downloading https://nodejs.org/dist/v10.15.3/node-v10.15.3-darwin-arm64.tar.gz to /Users/myname/.m2/repository/com/github/eirslett/node/10.15.3/node-10.15.3-darwin-arm64.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
@jowin-yip-TR with the M1 you need to use version 1.11.0 (or newer) of this plugin.
After upgrading from 1.10.0 to 1.11.0, I get also the 404 error. The plugin try to download nodejs from https://nodejs.org/dist/v14.15.4/node-v14.15.4-linux-x64-musl.tar.gz instead of https://nodejs.org/dist/v14.15.4/node-v14.15.4-linux-x64.tar.gz.
I also tried on version 1.10.1 and I get the same behavior as version 1.11.0.
I got this error only when I launch maven throught our Gitlab-Runner which is running on a Kubernetes Cluster deployed on a standard Linux Arch64 (Debian). The runner is deployed using image gitlab/gitlab-runner:v13.4.1. But the gitlab's job use an image based on adoptopenjdk/openjdk14:alpine.
I don't reproduce the issue on my own computer which is also an Linux Arch64 (Linux Mint).
@gronono did you override the nodeDownloadRoot
configuration? It's supposed to get alpine builds from https://unofficial-builds.nodejs.org/download/release/, there is some logic in the plugin for that.
I use the following configuration
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<downloadRoot>${node.url}</downloadRoot>
</configuration>
<executions>
<execution>
<id>install-node-and-npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>generate-resources</phase>
</execution>
<execution>
<id>set-npm-registry</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>config set registry=${npm.registry.url}</arguments>
</configuration>
</execution>
</executions>
</plugin>
with values
<node.url>https://nodejs.org/dist/</node.url>
<node.version>v14.15.4</node.version>
<npm.registry.url>https://registry.npmjs.org/</npm.registry.url>
It is configurable because on some projects, we use a proxy / cache but not in this project.
@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!
@eirslett It is invalid for my windows. Following is my configuration, i have used mirror of taobao.
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.9.1</version>
<configuration>
<nodeVersion>v10.16.0</nodeVersion>
<npmVersion>6.9.0</npmVersion>
<!--配置公网的镜像地址-->
<nodeDownloadRoot>http://npm.taobao.org/mirrors/node/</nodeDownloadRoot>
<npmDownloadRoot>http://npm.taobao.org/mirrors/npm/</npmDownloadRoot>
<!--配置公网的npm仓库地址-->
<npmRegistryURL>http://npm.thunisoft.com</npmRegistryURL>
<!--前端资源所在路径(每个项目可能不一样,可以固定文件夹)-->
<workingDirectory>./web</workingDirectory>
</configuration>
<executions>
<!--执行npm install 命令-->
<execution>
<id>npm install</id>
<phase>generate-sources</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<!--前端资源打包过程-->
<!--执行npm run build-->
<execution>
<id>npm run build</id>
<phase>generate-resources</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
fixed, can not use taobao.
any progress? is there any architecture flag parameter / flag?
@Sevyls seems like the 404 is a different issue for every person here. For some it's due to proxy settings, for others it's because of the system they're running on, so it really depends on your particular situation... I'll close this case, you could make a new issue that is more specific.
Hi everyone, also faced this issue on my mac with m1: node 10.14.1(tried to use latest as well) npm 6.4.1 frontend-maven-plugin 1.6 Could anyone suggest smth plz ?) I'm not using any proxy Error message: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.9.1:install-node-and-npm (install node and npm) on project : Could not download Node.js: Got error code 404 from the server.
@RomChig try using the newest version of the plugin.
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 :-)
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 :-)
Hmmm I'm seeing this too but the link is defo wrong: [INFO] Downloading https://nodejs.org/dist/v16.3.2/node-v16.3.2-linux-x64.tar.gz
It seems that the gz files have been replaced with xz files instead. https://nodejs.org/dist/v16.13.2/node-v16.13.2-linux-x64.tar.xz works, is there a way I can get the plugin to point at this instead?
@uvarvu Looks like you missed a 1 in the version number. You may have written 16.3.2
but really meant 16.13.2
?
Ah yep that was it thanks!
Hi.I am trying to download nodejs from my company's private artifactory which doesn't has tar.gz files. Is there a way to configure the plugin to download .xz files for linux platform or directly specify the download URL and stop plugin to append anything to the download URL?
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 :-)
I did the opposite mistake, I copied the npm version output from nvm which included the "v", but for npm you need to omit the v.
This worked:
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v18.12.0</nodeVersion>
<npmVersion>8.19.2</npmVersion>
</configuration>
</execution>
I am facing same issue on Windows. Below is the error: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.1:install-node-and-npm (install node and npm) on project frontend: Could not download Node.js from: https://nodejs.org/dist/v17.2.0/win-x64/node.exe: Could not download https://nodejs.org/dist/v17.2.0/win-x64/node.exe: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Below version I am using:
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 :-)
I do this, I waste one hour 😅
@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.
[INFO] Installing node version v10.15.3 [INFO] Downloading https://nodejs.org/dist/v10.15.3/node-v10.15.3-darwin-arm64.tar.gz to /Users/myname/.m2/repository/com/github/eirslett/node/10.15.3/node-10.15.3-darwin-arm64.tar.gz [INFO] No proxies configured [INFO] No proxy was configured, downloading directly
me too have same error for mac os
I have the same issue, running Arch Linux: My versions: `
`
Error message:
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.15.0:install-node-and-npm (install node and npm) on project taming-thymeleaf: Could not download Node.js: Could not download https://nodejs.org/dist/v21.6.0}/node-v21.6.0}-linux-x64.tar.gz: Illegal character in path at index 31: https://nodejs.org/dist/v21.6.0}/node-v21.6.0}-linux-x64.tar.gz -> [Help 1]
Check your node root, actually it must look into URL https://nodejs.org/dist/v21.6.0/node-v21.6.0-linux-x64.tar.gz
I am building cdap-ui using maven (version 3.6.3) but getting the same error as mentioned here. I am doing all things on cloudtop glinux. The error is:
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.15.0:install-node-and-yarn (dist) on project cdap-ui: 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.15.0:install-node-and-yarn (dist) on project cdap-ui: Could not download Node.js: Got error code 404 from the server.
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:
This is my maven setting:
In my maven settings.xml our corp. proxy is also set
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