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

Support for node install on arm (raspberry pi)

Open bhamail opened this issue 7 years ago • 9 comments

Do you want to request a feature or report a bug? Request support for node install on arm (raspberry pi)

What is the current behavior? The plugin installs the wrong architecture - Intel 386, should be armv7l:

$ file node/node
node/node: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=c5aeb5fb3808fe29a1ba11d1890f1193b9680d7c, not stripped

Actual architecture:

$ uname -a
Linux raspberrypi14 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

If the current behavior is a bug, please provide the steps to reproduce. I didn't call this a bug because I found prior reports of plugin problems on arm/raspberry pi, and it sounded like the problem was arm-pi versions of node were not being published at the time. Not sure if that is still the case (or how to check).

For reference, the error reported by the frontend plugin when trying to execute node looks like:

[ERROR] ...workspace/.../webui/node/node: 1: .../workspace/.../webui/node/node: Syntax error: word unexpected (expecting ")")

Manually trying to execute the version of node installed by the frontend plugin yields:

$ ./node/node -v
-bash: ./node: cannot execute binary file: Exec format error

What is the expected behavior? The correct version/flavor of node would be installed on the raspberry pi.

Please mention your frontend-maven-plugin and operating system version.

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 8.0 (jessie)
Release:	8.0
Codename:	jessie
    <groupId>com.github.eirslett</groupId>
    <artifactId>frontend-maven-plugin</artifactId>
    <version>1.6</version>

bhamail avatar Mar 15 '18 03:03 bhamail

That's right - the plugin doesn't support raspberry pi. Perhaps it would be possible by updating the system architecture heuristic. It's not a priority.

eirslett avatar Mar 15 '18 20:03 eirslett

OK. Thanks for confirming. Anything I can do to help it along? (Would be happy to try my hand at a PR). Is: https://github.com/eirslett/frontend-maven-plugin/blob/master/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/Platform.java the place to try changes?

bhamail avatar Mar 15 '18 21:03 bhamail

I pushed a couple PR's for consideration.

The automatic builds are failing, but I don't see how my changes could be the cause.

https://github.com/eirslett/frontend-maven-plugin/pull/705 https://github.com/eirslett/frontend-maven-plugin/pull/706

bhamail avatar Mar 16 '18 01:03 bhamail

@bhamail Maybe related to this https://www.npmjs.com/package/phantomjs-prebuilt#im-using-an-unsupported-version-of-linux-or-an-arm-processor-i-get-errors-about-unexpected-platform-or-architecture-what-do-i-do ??

akuhtz avatar May 25 '18 17:05 akuhtz

Just bumped into this issue, is there a reason this is not yet supported in the plugin (i.e. is there a reason the pull requests are not merged)? granted, node will be slow as hell on the Pi but since it barely costs anything to operate one time is not really of the essence :-)

DJGummikuh avatar Jul 10 '18 21:07 DJGummikuh

In my opinion there should be an option to determine architecture explicitly in pom.xml, as now I'm not able to even run my application on rpi.

dominikbrandon avatar Dec 29 '18 16:12 dominikbrandon

Has anyone found a workaround for the 'Could not download Node.js' issue on the Raspberry Pi?

Regzy-95 avatar Feb 01 '21 14:02 Regzy-95

Have you tried the newest version of the plugin?

eirslett avatar Feb 01 '21 14:02 eirslett

No I haven't, I'll check it out. I managed to extract the tar.gz UGS file onto the raspberry Pi 3 B model. I ran the usg platform shell script file located in the bin folder and that worked. Just need to get it to execute on startup now. Ive seen some information on it in a few other threads

Regzy-95 avatar Feb 01 '21 15:02 Regzy-95