Installing Joplin-terminal on termux

I have been using Joplin, which is a free, open-source note-taking and to-do app, to make notes for quite some time now. Joplin allows users to organize their notes into notebooks and sub-notebooks, tag notes with keywords, and search for notes using full-text search. The app also includes support for Markdown syntax, which allows users to format their notes with headings, bullet points, and other elements, and can even convert Markdown to HTML for easy sharing. One key reason for me to use it is that I can host the database myself and sync it across all my devices. However, Joplin has a hard dependency on Electron and NPM, which makes it unusable on devices such as the iBook G4. Therefore, I thought about using the iBook to SSH into an Android phone that could run Joplin-Terminal.

pkg install nodejs-lts
pkg install libvips
pkg install binutils
pkg install xorgproto
pkg install libsecret
NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin
ln -s ~/.joplin-bin/bin/joplin /data/data/com.termux/files/usr/bin/joplin

Note that you have to have an SSH server installed on Termux beforehand. Additionally, I may have missed some dependencies as I had a lot of packages installed on Termux before installing Joplin.