Raj
Raj

Reputation: 249

PouchDB 5.3.0 - Error: Database location or iosDatabaseLocation value is now mandatory in openDatabase call

Having issues with PouchDB 5.3.0. I am getting following error in my Ionic app

Error: Database location or iosDatabaseLocation value is now mandatory in openDatabase call

The above error is because of below line of code:

> var websql = new PouchDB('websqlpouch', {adapter: 'websql'});

I am trying to use SQLite plugin in Ionic app.

Upvotes: 5

Views: 7519

Answers (3)

akshay shetty
akshay shetty

Reputation: 304

https://github.com/litehelpers/cordova-sqlite-ext You can get the new plugin version of sqlite-storage in this link.

Upvotes: 1

jnair
jnair

Reputation: 91

Seems the issue was closed a year back.

I am on version 5.3.1 and I went ahead and used the location key and it works:

var db = new PouchDB('myDB', {adapter: 'websql', location:'default'});

As mentioned here, using the default value for the location key.

PouchDB: Version 5.3.1
Cordova-sqlite-storage: Version 1.2.0

Upvotes: 8

hypery2k
hypery2k

Reputation: 1691

The problem is already reported: https://github.com/pouchdb/pouchdb/issues/4979 You need to wait for a new version or use an older plugin version of sqlite-storage:

cordova plugin rm cordova-sqlite-storage
cordova plugin add [email protected]

Upvotes: 14

Related Questions