Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak: add node-gyp as dependency #939

Open
Lunarequest opened this issue Oct 10, 2023 · 3 comments
Open

Flatpak: add node-gyp as dependency #939

Lunarequest opened this issue Oct 10, 2023 · 3 comments
Labels

Comments

@Lunarequest
Copy link

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

@shiftkey
Copy link
Owner

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 12668bf

I don't think adding node-gyp here is the right fix, because it's tied to , as Node v18.17.0 nodejs/node#48694 has this change in the release notes nodejs/node@ce7e6c6 where the NAPI_VERSION version is incremented from 8 to 9, which is why I believe this is occurring now.

@Lunarequest
Copy link
Author

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.

@shiftkey
Copy link
Owner

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-notifications package?)

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.

@shiftkey shiftkey added the meta label Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@shiftkey @Lunarequest and others