For my case i was importing PouchDB like this:
importScripts("//cdn.jsdelivr.net/pouchdb/5.3.1/pouchdb.min.js");
The url should start with proper http/https.
So changing to this solved the problem:
importScripts("https://cdn.jsdelivr.net/pouchdb/5.3.1/pouchdb.min.js");