Closed Page- closed 2 years ago
https://github.com/product-os/flowzone/pull/203
... look for package.txt
and pipe it to apt-get install -y
@ab77 The preinstall script for the Supervisor specifically works. The case may be different for repos that use Flowzone in general though. @klutchell has a vision for Flowzone last time I opened an issue here so I'm curious what he thinks.
I like @ab77's solution in #203 but it's even better if we don't need it. As far as I can tell, npm is the only project type that might require a pre-install of some kind and it already supports it natively via package.json?
I would think that docker(-compose) and balena packages would never have local dependencies. So maybe we shelf the package.txt solution until we find a need for it?
npm is the only project type
If we support Python, there may be system dependencies as well prior to running pip install -r ...
This can be handled by #216 using a flowzone-preinstall
script in package.json
For reference a standard preinstall
script does not work on npm 7+ because the preinstall script happens after dependencies are installed, which kind of scuppers things if the dependency is what requires the native module
eg using a native module which requires dbus requires that dbus is installed in the environment in order for
npm ci
to work