frontend-maven-plugin
frontend-maven-plugin copied to clipboard
Bug : nodejs windows
Trying to install nodejs using the front-end-maven plugin only to get this error :
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.16:install-node-and-npm (install node and npm) on project test: Could not download Node.js from: http://nodejs.org /dist/v7.9.0/x64/node.exe: Got error code 407 from the server. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
And when I checked that after the version v4 of node the node.exe is in the path win-x64 and not x64
http://nodejs.org /dist/v7.9.0/x64/node.exe: Got error code 407 from the server
You are behind a proxy, and your proxy needs credentials. => Not a bug
Hi, I have the solution for this, It is working fine for me and the build got success. Don't DO's:
-
please do not add any new entry in pom.xml like the below
` <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot> <npmDownloadRoot>http://registry.npmjs.org/npm/-/</npmDownloadRoot>`
-
It will append extra line to the actual url to download nodejs and npm.
DO's.
- please verify the URL return by maven logs in the browser.
- It should open the download path of nodejs
- you just add the network proxy in Maven's settings.xml file
<proxies> <proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>username</username> <password>password</password> <host>xxx.xx.xx.xx</host> <port>*****</port>port number <proxy> <proxies>
Note: your company's network proxy and it's host, username, password details. - mvn clean install , it will be downloaded and install automatically ... you can see the magic in Maven console.
I hope it will help you guys... :)
Regards, Senthilkumar.S RENAULT NISSAN-CHENNAI
http://nodejs.org /dist/v7.9.0/x64/node.exe: Got error code 407 from the server
You are behind a proxy, and your proxy needs credentials. => Not a bug
Understood that it gives 407 NTLM authentication issue while behind proxy, but proxy is Corporate Policy, what is the path forward to bypass this error.
Same issue here, plain name/password is not accepted, need to use NTLM. Note that downloading 'regular' Maven dependencies works fine (without putting name/pw in settings.xml, so I assume it uses Windows magic to authenticate somehow).
Just tell your sysadmins to install a LTS version of node.js and npm on all the developer machines in the company. And then use exec-maven-plugin 👌
Workaround: Before running maven goal to build, manually download node and keep in path ~/.m2/repository/com/github/eirslett/node/$version/.
Example: I had issue while downloading yarn and running below manually solved my problem as plugin will not try downloding at all:
curl -k -o ~/.m2/repository/com/github/eirslett/yarn/1.19.0/yarn-1.19.0.tar.gz --create-dirs --proxy http://proxy.host:port --proxy-user $USER:$PASS -L https://github.com/yarnpkg/yarn/releases/download/v1.19.0/yarn-v1.19.0.tar.gz