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

wrong download path for Node 10 on arm7l-Architecture (Rasbperry Pi 3) (no more x86 binaries)

Open phip1611 opened this issue 7 years ago • 5 comments
trafficstars

Hi! Since Node 10 NodeJs.org doesn't provide binaries for (linux) x86 anymore. Frontend-Maven-Plugin tries to download https://nodejs.org/dist/v10.0.0/node-v10.0.0-linux-x86.tar.gz on my Rasbperry Pi 3 (with Rasbian Operating System) which is not there anymore. It should download https://nodejs.org/dist/v10.0.0/node-v10.0.0-linux-armv7l.tar.gz instead which is the right binary for the raspberry pi.

phip1611 avatar Apr 30 '18 10:04 phip1611

So there is a workaround to fix the issue:

  1. Download the proper node version for your RPi. I have a RPi 3, so I downloaded https://nodejs.org/dist/v10.6.0/node-v10.6.0-linux-armv7l.tar.gz
  2. Extract the folder which is in the file
  3. Rename the extracted folder node-v10.6.0-linux-armv7l to node-v10.6.0-linux-x86
  4. tar the folder again to .m2/repository/com/github/eirslett/node/10.6.0/node-10.6.0-linux-x86.tar.gz
  5. Run your maven build.

Note: The version v10.6.0 is used as nodeVersion property in my maven plugin configuration.

lazabazsa avatar Aug 01 '18 18:08 lazabazsa

Smart!!..

@lazabazsa , you saved my day, thanks!

prosidney avatar Aug 16 '18 06:08 prosidney

@eirslett Are there any plans to prioritize an actual fix for this so that the workaround is no longer needed? Given the popularity of the pi platform and all. I noticed a couple pull request that had tried to fix this but they failed some tests

petercn avatar Oct 26 '19 11:10 petercn

Also, I discovered this because building Nexus OSS (https://github.com/sonatype/nexus-public) on my raspberry pi began breaking when they added this plugin as a dependency in version 3.17 which came out around June 25, 2019

petercn avatar Oct 26 '19 11:10 petercn

The bug is in Architecture.guess() in Platform.java.

This method assumes that the system property "os.version" contains the string "v7" for the armv7l architecture. If the "v7" is not present, the fallback x86 gets selected which is clearly wrong. But on Linux, "os.version" simply contains the kernel version string, which in general does not include the platform. In my case for example, it is "5.11.2-1-ARCH". Not sure how to fix this. Can we safely remove the '&& version.contains("v7")' part without breaking the heuristic for another architecture/OS? I suspect this check is there for a reason.

areimer2 avatar May 21 '21 10:05 areimer2