eirslett / frontend-maven-plugin

"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins." A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
Apache License 2.0
4.24k stars 869 forks source link

Bug : nodejs windows #644

Open yiss opened 7 years ago

yiss commented 7 years ago

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

mriehema commented 7 years ago

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

senthilkumarselvakesavan commented 6 years ago

Hi, I have the solution for this, It is working fine for me and the build got success. Don't DO's:

  1. 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>`
    1. It will append extra line to the actual url to download nodejs and npm.

DO's.

  1. please verify the URL return by maven logs in the browser.
  2. It should open the download path of nodejs
  3. you just add the network proxy in Maven's settings.xml file ` optional true http username password xxx.xx.xx.xx *****port number ` Note: your company's network proxy and it's host, username, password details. 4. 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

kasingal commented 4 years ago

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.

ghost commented 3 years ago

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).

eirslett commented 3 years ago

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 👌

kasingal commented 3 years ago

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