Skip to content
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

Compilation errors for Sqlite3 and LevelDB #205

Open
klehmann opened this issue Jun 17, 2019 · 1 comment
Open

Compilation errors for Sqlite3 and LevelDB #205

klehmann opened this issue Jun 17, 2019 · 1 comment
Labels

Comments

@klehmann
Copy link

We are trying to use PouchDB (preferred as a server) in the Node.js environment on iOS with a persistent database.

That probably requires native code compilation in all cases (e.g. sqlite3, leveldb) which fails when using the standard NPM packages (I can provide the error output, but doing an npm install sqlite3 or leveldb would be enough to reproduce).

In your sample project, you where using express-pouchdb with an in-memory database.

Do you have any hints how to make this work with a persistent database? Getting sqlite3 to work would probably be a giant step forward. Maybe there's already a fork that has been tweaked to make it work with Node.js on Mobile?

@jaimecbernardo
Copy link
Member

Hi @klehmann ,
These samples use sqlite3 with nodejs-mobile-react-native and nodejs-mobile-cordova, which contain code to rebuild the modules that contain native code to mobile platforms:

https://github.com/JaneaSystems/nodejs-mobile-samples/tree/651937e419bf1c82fda1f06e8f9c828d5df86fbc/cordova/UseNativeModules
https://github.com/JaneaSystems/nodejs-mobile-samples/tree/651937e419bf1c82fda1f06e8f9c828d5df86fbc/react-native/UseNativeModules

It's also possible to build some versions of leveldown: nodejs-mobile/nodejs-mobile-module-compat#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants