Flatpak: add node-gyp as dependency
The problem
node-gyp is a dependency of many of the packages desktop depends on, however it is not listed as a dependency so when the postinstall script attempts to call node-gyp it will fail and fall back to prebuild-install which will not work. The simplest solution to this problem would be add it to the depancy list.
Release version
release-3.3.3-linux2
Operating system
Linux Flatpak
Steps to reproduce the behavior
No response
Log files
https://buildbot.flathub.org/#/builders/6/builds/72286
Screenshots
No response
Additional context
No response
I encountered this during the last releases because I was using a newer version of Node which caused the prebuilds to fail. You can see the same log here: https://github.com/shiftkey/desktop/actions/runs/6448739274/job/17506532547#step:6:48
No prebuilt binaries found (target=4 runtime=napi arch=x64 libc= platform=linux)
This was also occurring on Node.js v18.18.0 and given desktop-notifications is a Windows-only dependency I wasn't in the mood for doing this rebuilding for Linux when it's not used, and I instead pinned my version of Node to v18.14.0 https://github.com/shiftkey/desktop/commit/12668bfca547601d4223d514b096525eff5f592c
I don't think adding node-gyp here is the right fix, because it's tied to , as Node v18.17.0 https://github.com/nodejs/node/pull/48694 has this change in the release notes https://github.com/nodejs/node/commit/ce7e6c6765c32985f89ce0fc434c483027dc5233 where the NAPI_VERSION version is incremented from 8 to 9, which is why I believe this is occurring now.
I can't downgrade node without building it from source. and in the logs the error is node-gyp not found, at which point it calls prebuild, which can't connect to the internet. Would it be possible to make desktop-notifications only install on windows? I know some packages can do that.
At the moment I'm not sure what the actionable steps are here:
- if we add
node-gyp, which version should we use? - are there other options here worth exploring to reduce friction (e.g. remove
desktop-notificationspackage?)
I suspect the upstream project will churn onto a newer version of node which may or may not break me in the coming weeks/months, but for now I don't really have much bandwidth to dig into this further.