Before RC0 I used Crypto-Pouch for data encryption with PouchDB. After a couple of days I got PouchDB working with RC0 (following this topic).
Now my problem is, how to use the plugin Crypto-Pouch with PouchDB. Until beta.11 I used this code:
var PouchDB = require(‘pouchdb’).plugin(require(‘crypto-pouch’));
I tried the following steps:
npm install crypto-pouch --save
Because there exists no type definition for Crypto-Pouch, I tried to make a “Short-hand Definition” like described in this article by inserting the following line into src/declarations.d.ts:
declare module ‘crypto-pouch’;
In my provider I changed the line with require(…) (see above) to:
import PouchDB from ‘pouchdb’;
import CryptoPouch from ‘crypto-pouch’;
Now there’s no error message using ionic serve, but I get no output and only the following message on the console:
Uncaught TypeError: Cannot read property ‘listenerCount’ of undefined
Is there anybody who can help me? Thanks in advance!