zwave-js / zwave-js-ui

Full featured Z-Wave Control Panel UI and MQTT gateway. Built using Nodejs, and Vue/Vuetify
https://zwave-js.github.io/zwave-js-ui
MIT License
968 stars 205 forks source link

RaspberryPi build error: yarn ERROR: "build:ui" exited with 129 #2699

Closed sn3ak closed 2 years ago

sn3ak commented 2 years ago

I'm following the directions to build zwave-js-ui since the download package is not compatible with a raspberrypi. This is a fresh install of OS and zwave-js-ui.

I'm getting the following error: ERROR: "build:ui" exited with 129.

Full build log:

pi@zwave:~ $ git clone https://github.com/zwave-js/zwave-js-ui
cd zwave-js-ui
yarn install
Cloning into 'zwave-js-ui'...
remote: Enumerating objects: 13117, done.
remote: Counting objects: 100% (92/92), done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 13117 (delta 42), reused 61 (delta 25), pack-reused 13025
Receiving objects: 100% (13117/13117), 30.31 MiB | 8.38 MiB/s, done.
Resolving deltas: 100% (9369/9369), done.
➤ YN0000: ┌ Resolution step
➤ YN0002: │ ts-node-dev@npm:2.0.0 [b9e30] doesn't provide @types/node (p8a743), requested by ts-node
➤ YN0060: │ zwave-js-ui@workspace:. provides eslint (p560d0) with version 8.21.0, which doesn't satisfy what eslint-loader requests
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 3s 4ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 6s 230ms
➤ YN0000: ┌ Link step
➤ YN0007: │ core-js@npm:2.6.12 must be built because it never has been before or the last one failed
➤ YN0007: │ docsify@npm:4.12.2 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:3.24.1 must be built because it never has been before or the last one failed
➤ YN0007: │ leveldown@npm:5.6.0 must be built because it never has been before or the last one failed
➤ YN0007: │ @serialport/bindings-cpp@npm:10.7.0 must be built because it never has been before or the last one failed
➤ YN0007: │ level@npm:5.0.1 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 1m 58s
➤ YN0000: Done with warnings in 2m 9s

pi@zwave:~/zwave-js-ui $ yarn run build
                            ERROR: "build:ui" exited with 129.
pi@zwave:~/zwave-js-ui $ node -v
v16.17.1
pi@zwave:~/zwave-js-ui $ yarn -v
3.2.1
pi@zwave:~/zwave-js-ui $ uname -a
Linux zwave 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64 GNU/Linux
pi@zwave:~/zwave-js-ui $ cat /etc/debian_version
11.5
b-cole commented 2 years ago

I had this same problem on my pi3 1GB. Check your /var/log/messages, it will probably show that the reason for the 129 error is that the system killed your build process due to an oom (out of memory) condition.
I resolved this by building on a pi4 2GB instead.
Also, there are snap builds for the pi, but they are not current: % snap info zwave-js-ui name: zwave-js-ui summary: "" publisher: Giaever.online (giaever-online) store-url: https://snapcraft.io/zwave-js-ui license: unset description: |

snap-id: bKAUrYAOTfQjguWrb9V3CrABqC01QIhC channels: latest/stable: –
latest/candidate: –
latest/beta: –
latest/edge: v7.1.0-SEL-CC 2022-09-16 (2) 141MB -

robertsLando commented 2 years ago

You could suggest disabling source maps in webpack build, otherwise consider using docker or snap

sn3ak commented 2 years ago

I wanted to update this in case someone else runs across the same issue. There is an alternate fix. By default raspbian/raspberry pi OS sets the swap file to 100mb by default. By changing it to 1024M I was able to get this compiled and running. Watching the output of top, I believe setting swap to 512M would be sufficient as I never saw swap go over 400MB.

Thank you @b-cole for sending me down the right path.

b-cole commented 2 years ago

Thanks, guess I should have tried upping the swap too. I'd like to note that on my 2GB pi, the 100MB swap remained sufficient, it was just my 1GB pi that always hits the OOM condition with the default 100MB swap.