Getting the following error whenusing PouchDB with Ionic 2 TypeScript error: typings/globals/pouchdb/index.d.ts(4,19): Error TS2503: Cannot find namespace 'PouchDB'.
TypeScript error: typings/globals/pouchdb/index.d.ts(4,19): Error TS2503: Cannot find namespace 'PouchDB'.
Reproduce:
ionic start cloudo-auth blank --v2 cd cloudo-auth blank sudo npm install pouchdb --save sudo typings install dt~pouchdb --global --save ionic serve
`
I’ve only just come across this issue so not 100% sure on the reasoning, but from what I can tell it’s an intended side effect of an update to typings which strips references.
typings
If you manually install all the dependencies it seems to work:
typings install --global --save dt~pouchdb dt~pouchdb-adapter-websql dt~pouchdb-browser dt~pouchdb-core dt~pouchdb-http dt~pouchdb-mapreduce dt~pouchdb-node dt~pouchdb-replication