Custom component's requirement needs npm

I’m putting together a custom component, but one of its pip requirements needs npm in order to build/install.

Is there a way to, for a custom integration, either install npm or just run it? Can I install/run a binary as part of the custom component install?

Maybe, you can generate a binary and upload it github releases and download it while initiating the component.

Check webrtc custom component, it is downloading go2rtc as binary and running it

1 Like

Not that I know of. Wut, a Python module requiring npm upon install? That is more insane than left-pad.

I reached a temporary/development solution for the time being:

A new Dockerfile, which adds npm and node to the latest homeassistant Docker image; and I’ve updated my docker-compose file to use that image instead. Not ideal, but gets me developing.

(the “Why?” is PythonMonkey, a project from my dayjob)