Node-red pallet install failure of node-red-contrib-i2c (SOLVED)

Hi all.

I have a home assistant installation running in Hass.io on a pi3. It is fully up to date. I have installed three add-ons: file editor, node-red and SSH/terminal. Node-red works really well out of the box and I have built a small dashboard.

It has been working well (capturing information from an OWL electricity meter) and I want to extend it to include some IO through the Pi.

However, I want to install a new pallet in Node-red: node-red-contrip-i2c (node-red-contrib-i2c (node) - Node-RED) to allow me to talk to external hardware.

Normally in a standard node-red installation I would add the pallet within the node-red dashboard itself
but it fails (see below for the full log - item 1).

I read more about the Hass.io + node-red installation and saw there is an alternative way from within the config for node-red itself

e.g., snip

npm_packages:
  - node-red-contrib-i2c

This also fails showing a lack of python. More reading showed that I need to specifically install each system_package to build the node-red pallet in the config file. Once I identified the packages (alpine linux searching was the key - as per the docs)

I now have a working model - it takes A-G-E-S to load, but gets there

npm_packages:
  - node-red-contrib-i2c
system_packages:
  - linux-headers
  - python3
  - npm
  - make
  - g++

Some info for the next hacker who tries this.

—logs below here—

Attempt to install pallet inside node-red

022-07-13T08:21:31.088Z Install : node-red-contrib-i2c 0.9.0

2022-07-13T08:21:31.357Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
2022-07-13T08:21:34.798Z [err] npm
2022-07-13T08:21:34.801Z [err]  WARN
2022-07-13T08:21:34.802Z [err]  config production Use `--omit=dev` instead.
2022-07-13T08:21:41.676Z [err] npm
2022-07-13T08:21:41.678Z [err]  ERR! code 1
2022-07-13T08:21:41.678Z [err] npm
2022-07-13T08:21:41.679Z [err]  ERR!
2022-07-13T08:21:41.679Z [err]  path /config/node-red/node_modules/i2c-bus
2022-07-13T08:21:41.690Z [err] npm ERR! command failed
...
2022-07-13T08:21:41.767Z rc=1