You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use your package to run hnswlib in a Chrome extension's background script. When I call loadHnswlib I get the error:
import() is disallowed on ServiceWorkerGlobalScope by the HTML specification.
Note that I don't get this error when importing transformers.js and it's successfully working in the background script, so it's not generally failing to do imports.
Any idea why your module might be different? I'm stumped why one module would import and work but not another, given this error message.
The text was updated successfully, but these errors were encountered:
Browser extension service workers do not support dynamic import - source
There are two methods of importing scripts into a service worker: the import statement and the importScripts() method. Note that import(), often called a dynamic import, is not supported.
Hello,
I'm trying to use your package to run hnswlib in a Chrome extension's background script. When I call loadHnswlib I get the error:
import() is disallowed on ServiceWorkerGlobalScope by the HTML specification.
Note that I don't get this error when importing transformers.js and it's successfully working in the background script, so it's not generally failing to do imports.
Any idea why your module might be different? I'm stumped why one module would import and work but not another, given this error message.
The text was updated successfully, but these errors were encountered: