frontend-maven-plugin icon indicating copy to clipboard operation
frontend-maven-plugin copied to clipboard

nodeDownloadRoot and node.version

Open mash-sap opened this issue 2 years ago • 7 comments

We experience the following problem during the node installation (install-node-and-npm). The lookup for the node.exe fails due to a mismatch of the node-version and folder structure of the node archive/zip. Is there a configuration to resolve this?

Current setup: nodeDownloadRoot=https://our.server/org/nodejs/download/node/node node.version= 16.19.0

Download is done from: https://our.server/org/nodejs/download/node/node/16.19.0/node-16.19.0-win-x64.zip

After unpacking the archive we get following error: [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.2:install-node-and-npm (install-node-and-npm) on project my-project: Could not install Node: Could not find the downloaded Node.js binary in C:\my-project\node\tmp\node-16.19.0-win-x64\node.exe

Expected location: C:\my-project\node\tmp\node-16.19.0-win-x64\node.exe Actual location: C:\my-project\node\tmp\node-v16.19.0-win-x64\node.exe

Looks like that the plugin is using the provided node.version for the download and the file location lookup, which is not working in this case. Do you have any suggestion how we can point the expected location to the correct location?

mash-sap avatar Apr 14 '23 21:04 mash-sap

Any ideas how to resolve this?

mash-sap avatar Apr 21 '23 10:04 mash-sap

Try using a v before the version number? v16.19.0

eirslett avatar Apr 24 '23 16:04 eirslett

Try using a v before the version number? v16.19.0

Thanks for the suggestion, Eirik. Do you mean to provide the following? node.version= v16.19.0

This would create following downloadURL which will result in HTTP 404: https://our.server/org/nodejs/download/node/node/v16.19.0/node-v16.19.0-win-x64.zip

I think the problem is, that the archive file contains the v in its folder structure while the download URL does not contain the v

mash-sap avatar Apr 24 '23 17:04 mash-sap

Maybe your server is set up with the wrong URL path?

eirslett avatar May 01 '23 19:05 eirslett

Maybe your server is set up with the wrong URL path?

That's exactly the issue. Is there any options in the plugin to work around this problem?

mash-sap avatar May 02 '23 07:05 mash-sap

There is no option in the plugin. You'll have to change your own proxy server, so that the URL structure is exactly the same as on nodejs.org.

eirslett avatar May 02 '23 19:05 eirslett

Hi @mash-sap, did you already find a solution to your problem? Facing the same right now...

marchpane avatar Jul 22 '24 14:07 marchpane