Closed danielkrajnik closed 1 month ago
I've tried changing version in package.json to 20.2.0 and running yarn install
, but it kept failing.
Trying to build node version 12.13.1 from source now...
...and failing:
../deps/v8/src/base/debug/stack_trace_posix.cc:34:10: fatal error: 'execinfo.h' file not found
yep, confirmed that you can't compile nodejs on android.
Tried grabbing a nodejs 12 .deb package from debian, but it won't be installed because it has unresolved dependencies: https://debian.pkgs.org/12/debian-main-arm64/nodejs_18.13.0+dfsg1-1_arm64.deb.html
by the way version 12 isn't supported anymore?
I thought about running it in a docker container, but it requires qemu and seems too much just to run organice.
Other options: proot or packaging it as a native client with something like react native or flutter. Keep trying...
How about webpack? Could it be packaged as a bundle of static content and served from temux from a regular http server? This sounds like the simplest and most secure solution.
Hi @danielkrajnik, first of all let me express my admiration of your bravery. :)
Secondly, May I ask what your use case is for running organice within Termux?
Organcie is a PWA with offline capabilities which syncs to a storage backend of your choosing when online. If you just want to use organice on your phone pointing a browser to any instance e.g. https://organice.200ok.ch should be enough.
If you have a use case for hosting a PWA within Termux on an Android device consider me intrigued. I'd love to hear about it.
Hi @branch14
thanks for chiming in. Op wants to access local files. There’s prior art and documentation on how to run organice in Termux with a local WebDAV server to accomplish that: https://github.com/200ok-ch/organice/tree/master/contrib
IC. Nevermind my patronizing scrutiny then. :)
Thanks both: @munen I haven't seen this guide. The version it mentions is outdated and because termux only offers the latest version of node, which as of june 2023 is 20.2.0 it won't work at all. But then it mentions building termux repositories yourself - I haven't tried that yet. I imagine that you would need to cross-compile that version of node for android. It's definitely doable, but if it ever changes you will need to do it again, so I wonder if given that organice is a client-side SPA wouldn't it be possible to just bundle it with something like webpack and serve its html, css and js with another http server (on localhost)? That would be much easier.
@branch14 I'm trying to self host the app and use local files. The idea was to serve them with a webdav server (dufs). I think it's important to be able to self-host if you care about privacy. There has been a fork that allowed for direct access to local storage, but I couldn't find out how to build it.
@danielkrajnik
so I wonder if given that organice is a client-side SPA wouldn't it be possible to just bundle it with something like webpack and serve its html, css and js with another http server (on localhost)? That would be much easier.
Yes, you can just compile organice on any machine and host it on any kind of webserver. That's exactly how we host organice on https://organice.200ok.ch, in fact(;
Here's the doc for that: https://organice.200ok.ch/documentation.html#deployment
If you have further questions, feel free to re-open this issue!
Describe the bug package.json requires version 12. This won't work on termux. Binary distribution is no longer supported:
curl -fsSL https://deb.nodesource.com/setup_12.x | bash - && pkg install nodejs
won't work and because termux uses $PREFIX same as nvm, nvm is unavailable to downgrade.If there is another way to run organice on android please let me know.
To Reproduce Steps to reproduce the behavior:
Expected behavior Use nodejs 20.2.0
Smartphone (please complete the following information):