I use a custom pkugin called Kettle for Obsidian that I want to use on mobile. Using Termux, I was able to install npm:

apt install npmjs

However, attempting to build the plugin fails:

~/.../.obsidian/kettle $ npm install
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm error code EACCES
npm error syscall symlink
npm error path ../acorn/bin/acorn
npm error dest /storage/emulated/0/website/content/.obsidian/kettle/node_modules/.bin/acorn
npm error errno -13
npm error Error: EACCES: permission denied, symlink '../acorn/bin/acorn' -> '/storage/emulated/0/website/content/.obsidian/kettle/node_modules/.bin/acorn'
npm error     at async symlink (node:internal/fs/promises:1001:10)
npm error     at async Promise.all (index 0)
npm error     at async Promise.all (index 0)
npm error     at async #createBinLinks (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:394:5)
npm error     at async Promise.allSettled (index 0)
npm error     at async #linkAllBins (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:375:5)
npm error     at async #build (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:160:7)
npm error     at async Arborist.rebuild (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:62:5)
npm error     at async [reifyPackages] (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11)
npm error     at async Arborist.reify (/data/data/com.termux/files/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5) {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'symlink',
npm error   path: '../acorn/bin/acorn',
npm error   dest: '/storage/emulated/0/website/content/.obsidian/kettle/node_modules/.bin/acorn'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm error A complete log of this run can be found in: /data/data/com.termux/files/home/.npm/_logs/2024-10-26T14_47_54_715Z-debug-0.log

As it turns out, this is because symlinks are not allowed on internal device storage (see Stack Overflow). Building the package in Termux’s storage instead works. Afterwards, compiling the plugin on mobile using Termux, the steps are the same as Desktop:

npm install
npm run dev

But we just need to remember to copy the files to the .obsidian folder afterwards:

cp main.js ../storage/shared/website/content/.obsidian/plugins/kettle
cp manifest.json ../storage/shared/website/content/.obsidian/plugins/kettle