Uncaught NetworkError: Failed to execute ‘importScripts’ on ‘WorkerGlobalScope’

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");

Leave a Comment