Closed cprima closed 1 year ago
It turns out that using COMPANION_BUILD
was a bit broken, which I have fixed.
There is some comments for those variables in the file, but I don't recommend their use so I won't document it outside of the file https://github.com/bitfocus/companion-pi/blob/main/install.sh#L20-L24
But I don't think my changes would fix the fact that it failed to find a build for you. No matter what I set COMPANION_BUILD
to it would find and install v3.0.0
. Are you running this on an arm install (not arm64)?
But I don't think my changes would fix the fact that it failed to find a build for you. No matter what I set
COMPANION_BUILD
to it would find and installv3.0.0
. Are you running this on an arm install (not arm64)?
Many thanks for your investigation and time!
Indeed I was running install.sh from companion-pi repo on a Raspberry Pi 4 with Raspbian in the 32 bit version. I have now updated to a arm64 version (although of DietPi and not Raspbian), and install.sh works without a problem.
My root cause was: On that 32bit I must have updated Python3 to 3.11.x That leads down a rabbit hole, which triggered me to investigate your install.sh and update.sh in the first place (and lead to me opening this issue). My (limited) understanding of my root cause is: In Node v14.x.y ~npm~ node-gyp is not compatible with Python3.11, I got a bunch of errors like "ValueError: invalid mode: 'rU' while trying to load binding.gyp" and "TS2688: Cannot find type definition file for node_modules". Stackoverflow is full of these questions.
Long story short: Once I used a current 64bit base OS with Companion v3 all worked fine.
My understanding is that a manual Companion v2 installation with install.sh requires <=Python3.9, with Python3.11 the step yarn update
will fail.
I wanted to upgrade to v3 anyways, and only needed a one-shot installation of Companion v2 to export my buttons! :) Used a pre-made image for that, as I should have done from the get-go. I am now on Companion v3, with all my latest button changes, and am happy.
But hey, I now know every single line of your bash scripts, and I think I fully understood the v2 vs v3 logic. Quite a challenge to maintain!
Reading the packer file I now understand where these environment variables are coming from: https://github.com/bitfocus/companion-pi/blob/main/companionpi.pkr.hcl
Please document the use of the lines COMPANIONPI_BRANCH="${COMPANIONPI_BRANCH:-main}" COMPANION_BUILD="${COMPANION_BUILD:-beta}"
As install.sh will call ./update.sh stable "$COMPANION_BUILD" the epxected value needs to be known.
When running ./update.sh stable the line node "/usr/local/src/companionpi/update-prompt/main.js" $1 fails with No beta build was found! so I assume I should kow how to set $COMPANION_BUILD in the first place, and continue to troubleshoot from there.