question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nodeDownloadRoot and npmDownloadRoot not working

See original GitHub issue

I was trying to get the latest version of node. When I used version 0.0.24 it tried to download at https://nodejs.org/dist/v4.4.3/x64/node.exe when the actual file is at https://nodejs.org/dist/v4.4.3/win-x64/node.exe. I noticed that the Platform.java was updated to have this in getNodeDownloadFilename to set it correctly to win-x64 but now it no longer tries to download the file and instead tries to pull it from my mvn repository:

0.0.24: [INFO] — frontend-maven-plugin:0.0.24:install-node-and-npm (install node and npm) @ server — [INFO] Node v0.10.33 was installed, but we need version v4.4.3 [INFO] Installing node version v4.4.3 [INFO] No proxy was configured, downloading directly [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.300 s [INFO] Finished at: 2016-04-22T15:57:08-07:00 [INFO] Final Memory: 17M/266M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.24:install-node-and-npm (install node and npm) on project server: Could not download Node.js from: https://nodejs.org/nodejs/dist/v4.4.3/x64/node.exe: Got error code 404 from the server. -> [Help 1] [ERROR]

0.0.29

[INFO] — frontend-maven-plugin:0.0.29:install-node-and-npm (install node and npm) @ server — [INFO] Found proxies: [] [INFO] Node v0.10.33 was installed, but we need version v4.4.3 [INFO] Installing node version v4.4.3 [INFO] Copying node binary from C:\Users\Aaron Magi.m2\repository\com\github\eirslett\node\4.4.3\node-4.4.3-windows-x64.exe to C:\Work 2016\GitHub\aaronmagi\miwdesign\mcb-server\src\main\resources\static\node\node.exe [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.870 s [INFO] Finished at: 2016-04-22T15:57:36-07:00 [INFO] Final Memory: 15M/245M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.29:install-node-and-npm (install node and npm) on project server: Could not install Node.js: C:\Work 2016\GitHub\aaronmagi\miwdesign\mcb-server\src\main\resources\static\node\node.exe (The process cannot access the file bec ause it is being used by another process) -> [Help 1] [ERROR]

Here is my configuration:

                    <configuration>
                      <nodeVersion>v4.4.3</nodeVersion>
                      <npmVersion>2.7.1</npmVersion>
                      <nodeDownloadRoot>https://nodejs.org/nodejs/dist/</nodeDownloadRoot>
                      <npmDownloadRoot>https://registry.npmjs.org/npm/-/</npmDownloadRoot>
                    </configuration>

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:20 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
eirslettcommented, Apr 26, 2016

Even if nodeDownloadRoot is wrong, the plugin output is:

Could not download Node.js from: https://nodejs.org/nodejs/dist/v4.4.3/x64/node.exe: 

And given the root is was fixed, the resulting url should be

https://nodejs.org/dist/v4.4.3/x64/node.exe

which still fails because the correct URL should be

https://nodejs.org/dist/v4.4.3/win-x64/node.exe

with x64 vs win-64 in the URL being the difference. In Platform.java, the method getDownloadFilename is responsible for setting x64 vs win-x64. But I believe we’re calling that code anyways?

0reactions
dailytabscommented, Oct 2, 2019

Ah, gotcha.

Or, just add in some validation and spit out an error message. 😉

On Wed, Oct 2, 2019, 3:42 PM Eirik Sletteberg notifications@github.com wrote:

They changed the URL layout for where the binaries are located. Compare https://nodejs.org/dist/v5.6.0/ to https://nodejs.org/dist/v12.9.1/. I wouldn’t exactly say that node is at fault, but this plugin assumes a certain URL structure and then just inserts the version in the URL. Somebody ™️ could send a PR with an if/else statement to correct URL structures for legacy versions of node, I guess, but I’d rather just use the newer node version.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/eirslett/frontend-maven-plugin/issues/406?email_source=notifications&email_token=AAJJYRI7L5KIFFLOEDYAAZ3QMT2T7A5CNFSM4CB5AN6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAF54KI#issuecomment-537648681, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJJYROBQI3SOXFIVIXAMKTQMT2T7ANCNFSM4CB5AN6A .

Read more comments on GitHub >

github_iconTop Results From Across the Web

1 - Stack Overflow
Try to change the node version to v0.9.9. – sonu singhal · 1. thx for reply, I tried but it's not work new...
Read more >
A brand new website interface for an even better experience!
nodeDownloadRoot and npmDownloadRoot not working.
Read more >
slemarchand/eirslett-frontend-maven-plugin - JitPack
Not meant to install Node for production uses. The Node usage is intended as part of a frontend build, running common javascript tasks...
Read more >
Maven doesnt build the branch - CodeRanch
... i know whats causing the problem but i dont understand why. ... <npmDownloadRoot>http: //registry.npmjs.org/npm/-/</npmDownloadRoot>.
Read more >
Solved: Getting Started with React and AEM SPA Editor - Ch...
It's a network problem. ... <nodeDownloadRoot>http://nodejs.org/nodejs/dist/</ ... <npmDownloadRoot>http://registry.npmjs.org/npm/-/</ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found