PouchDB works in Browser, not in iOS/Android

Hello together,

my application is using PouchDB for data storage and synchronization.
This is working perfectly within the browser, however, it doesn’t on the device or simulator.
I get the error that PouchDB is not defined.
I have integrated it like this in my index.html:

I also tried to add the module “pouchdb” to angular.module(’…’, [‘ionic’, ‘pouchdb’, ‘…’]), but that doesn’t work either.

Any ideas?

Many thanks in advance!

Just found the solution by myself :blush::
Instead of referencing pouchdb remotely in my index.html, like this:

I have copied the file and stored it locally, which led to success:

Maybe this is going to help someone else as well!

Unfortunately one can’t see the code you posted, could you post that again? This would be quite helpful.


Hi, @p6n Could you please repost the code you mentioned? I am currently experiencing a similar problem.

hi @wilsonmaravilha,

it’s just that I didn’t reference the pouchdb js file remotely but directly as a local js file.
However, I switched to a MBaaS and am not using Pouch anymore.



Can you please let us know which MBaaS service / plugin you are using ? pouchdb is useless and need an alternative