anytype-ts
anytype-ts copied to clipboard
Platform prerequisites are incomplete
Have you read a contributing guide?
- [x] I have read CONTRIBUTING.md
- [x] I have searched the existing issues and didn't find any that were similar
- [x] I have considered creating a pull request with fixes instead of a bug report and want to proceed
Current Behavior
The project homepage (README.md) currently specifies the following build prerequisites:
Debian/Ubuntu sudo apt install libsecret-1-dev jq
These are insufficient to build anytype-ts on a standard Ubuntu desktop installation. The following are also required:
sudo apt install python3-setuptools python3-dev g++
Now, normally I would simply submit a PR for a doc change like this, but there are a few aspects here that ask for a discussion.
First, when running npm ci, those packages apparently are needed to install keytar. It is not immediately clear from the error messages, though, that that's the case. However, those packages are not installed by default on Ubuntu Desktop, just as jq and libsecret-1-dev are not.
Second, why does (part of) keytar have to be rebuild during installation? Doesn't it make it system-dependent? Apparently, the post-install script tries to patch it and rebuild. Is it because keytar is obsolete and unmaintained and there is no version available that works with the current Electron?
Third, even with the additional system packages installed, npm ci still fails. This seems to be because patching keytar, which is done in a post-install script generates a warning due to a version mismatch between the keytar installed (v7.9.0) and the patch (v.7.7.0). If keytar has to be used, shouldn't the patch be updated to the version used? There will be no newer version than 7.9.0 released, since keytar is EOL. Or, perhaps, modify package-locks.json/package.json to use exactly 7.7.0, rather than ^7.7.0.
Currently, to get the Node packages installed successfully, I do:
npm ci --ignore-scripts
npx patch-package
cd node_modules/keytar
npm run build
cd ../..
I doubt this is the best way to handle the problem, so I am not proposing to add this to README.md; I'm writing it here for reference, until a better way of handling keytar is implemented.
Fourth, see #804. Is keytar slated to be replaced in anytype-ts? If so, there is no need to update anything in README.md, no extra dependencies or prerequisites, no new patch, etc. Simply replace keytar with a better alternative.
All these questions are for the mainainer @ra3orblade, and depending on his plans/intentions for the future, a different course of action may be needed.
Expected Behavior
Running npm ci on Ubuntu installs all required dependencies without errors.
Steps To Reproduce
- On vanilla Ubuntu 24.04 desktop installation:
- Install packages: libsecret-1-dev jq
- Install snaps: node 22.20.0 and go 1.25.3
- Clone anytype-ts
- Run: npm ci
- Observe the installation failing
Environment
- OS: Ubuntu
- Version: 24.04.3 LTS (Noble Numbat)
Anything else?
No response