19

I built node.js for android and it is running great.

Now i need some modules for a new project (serialport,express,socket.io) but I can't use npm on my android device, since i cross compiled node and just put the executable on the device.

Is there a way to use npm on android or what would be the best way to do it?

I also tried building the packages on an arm qemu but the modules weren't working o the android box.

What I am trying to do at the moment is including the modules as core modules when building node, but I am unsure what to include. All modules and all the modules that those modules depend on, etc. etc. This doesn't sound right?

I am following these instructions, that were for a similar problem: https://github.com/mapbox/node-sqlite3/wiki/Building-for-Android

What would be the best way to achieve it?

Kind regards, egon

IngoAlbers
  • 5,722
  • 6
  • 31
  • 45
  • The `android-configure` script in Node project-dir mentions something about including NPM support (comment at the top). I recently investigated a number of recent node + android options: [Viable options to running NodeJS on Android (Aug 2017)](https://stackoverflow.com/a/45649995/8295283). If you have additional working options, that would be great. – Arnold Schrijver Aug 12 '17 at 15:24

1 Answers1

3

I played with termux (https://play.google.com/store/apps/details?id=com.termux&hl=en_US). In terminal you can install node.js and npm. I installed some packages from npm storage. Seems I did not found any problem. Especially if we are using samsung dex station.

ps probebly I downloaded modules via git from github. Not sure about npm.

Yaroslav Gaponov
  • 1,997
  • 13
  • 12