Open andreddosantos opened 3 years ago
OSRM is implemented in NodeJS as a binary loadable module. When you do npm install
, it downloads the appropriate binary module for the platform on which npm
is being executed (i.e. your local machine, your build machine).
If you've created a local build of your app, packed up the artifacts, then shipped them to a mobile device with a different architecture, you'll have the wrong OSRM binary module for that platform. The has bad ELF magic: cffaedfe
indicates that Linux (I assume you're deploying to Android) doesn't recognize the format of the node_osrm.node
file that you've bundled.
I don't know if we pre-publish the right binaries for your platform. You should try running npm install
from within your Android environment to see if it is able to fetch a working OSRM binary file.
Hello we're building an hybrid mobile app using ionic with cordova that uses offline maps. We would like to add an offline routing engine to calculate offline routes. Our app uses a nodejs backend on the phone for some functionalities and we also would like to include the osrm package into our nodejs mobile server.
We know its possible to use osrm in mobile for offline routing, since the app maps.me used to use it, and also as referred on this issue.
Our current error:
The app compiles successfully, but when trying to start the osrm library it breaks
Error:
Hope you can help, Kind regards André