-
Notifications
You must be signed in to change notification settings - Fork 256
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
Support for Termux on Android #777
Comments
We do have an issue for this #467, but as it's a non-trivial amount of work, I don't think it would get done anytime soon.
Unfortunately, mermaid-cli requries Puppeteer (or something similar like Playwright), since Mermaid doesn't support server-side rendering, see #750 As an alternate approach, can you install a chromium/firefox browser a different way (e.g. via If so, you can install PUPPETEER_SKIP_DOWNLOAD=true npx @mermaid-js/mermaid-cli --help Then, make a mermaid-cli/puppeteer-config.json Lines 1 to 6 in 90f0bb2
Then, you pass it via PUPPETEER_SKIP_DOWNLOAD=true npx @mermaid-js/mermaid-cli --puppeteerConfigFile puppeteer-config.json There are some docs in https://pptr.dev/troubleshooting#running-puppeteer-in-docker and puppeteer/puppeteer#9460 that might help. |
Hello just today I made this tutorial on the subject of Puppeteer on Android that might help https://gist.github.com/robertkirkman/0c2f3426024069546ed9b7bb2f26cb99 |
That looks like a good workaround albeit very heavy in terms of storage to install a full desktop environment just to run a small utility. For anyone already using Termux with desktop this would be ideal. I think the browser dependency is kinda non-negotiable, but perhaps the X desktop can be removed after getting the mmdc installed?
|
There is currently a Segmentation fault in the command |
I am happy to announce good news that I have fixed the Segmentation fault error, and integrated the patch into a PR into the termux-packages repository, and also updated my guide to have a Headless Mode section that has a full code example for using Puppeteer on Android in Headless mode (would start working whenever the PR is accepted and Termux mirrors are updated. If the PR turns out to have bugs or other issues, and can't be accepted to termux-packages yet, then I will eventually post directions for using it as a custom downstream build of Firefox specifically for Headless Node.js Puppeteer on Android, so that the custom build could be used for that purpose without breaking Firefox for other users) |
I would like install mermaid-cli on Android in Termux. It's failing on puppeteer install citing "current platform is not supported"
My desire is to be able to create mmd files in vim in Termux and use them in conjunction with pandoc to create documents with embedded diagrams.
Test environment
Termux from the (recommended) F-Droid store
Solutions explored:
Workaround I've explored include messy workarounds using rooted devices and docker or proot distros which is quite a heavy-handed (particularly in terms of Android resources) solution to installing an otherwise small package.
I've tried installing puppeteer-core but that does not work.
Potential Solutions:
The text was updated successfully, but these errors were encountered: