The declaration is as follows:
var PouchDB = require("pouchdb");
var db = new PouchDB("scr");
I've read about how it may be related to types and that adding:
"@types/node": "^10.12.0",
"@types/pouchdb": "^6.3.2",
to my package.json should help, but it isn't. I've tested on another simple .js file and works, but on my main app it isn't. Still, I don't understand why it wouldn't work. The pouch documentation is quite clear
https://pouchdb.com/api.html#create_document. I should mention I'm running this on the context of an electron app, not in the browser.