canonical / matter-pi-gpio-commander

Matter Raspberry Pi GPIO Commander - Turn your Pi into a Matter lighting device!
Apache License 2.0
90 stars 3 forks source link

Use Nodejs v18 arm64 and stable ZAP #22

Closed farshidtz closed 11 months ago

farshidtz commented 12 months ago

This PR solves several issues, introduced by #20 preventing the build on arm64.

An x64 node distribution was installed on arm64 snap:

:: /usr/bin/node: 1: ELF: not found                                                                                  
:: /usr/bin/node: 2: Syntax error: ")" unexpected  

The automated build from main branch is failing with the same error: https://snapcraft.io/matter-pi-gpio-commander/builds/2155429

Node and NPM versions were incompatible:

+ npm cache clean --force                                                                                 
:: ERROR: npm v9.8.0 is known not to run on Node.js v12.22.12.  This version of npm supports the following node versions: `^14.17.0 || ^16.13.0 || >=18.0.0`.

ZAP requires Node v16 or newer for the build. Using v12 failed the build with the following error:

npm ERR! Cannot read property '@globalhive/vuejs-tour' of undefined

A rebuild failed because the zap repo is cloned on top of existing files:

fatal: destination path '/opt/zap-v2023.05.22-nightly' already exists and is not an empty directory.