nodeDownloadRoot and npmDownloadRoot not working
See original GitHub issueI 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:
- Created 7 years ago
- Comments:20 (8 by maintainers)
Top GitHub Comments
Even if nodeDownloadRoot is wrong, the plugin output is:
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?
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: