-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: Unable to resolve specifier ... #392
Comments
Are you writing a custom plugin here? It would help to know how you are triggering the path to begin with. The |
the code is here: https://github.com/iobroker-community-adapters/ioBroker.webui/blob/8edd957ff674a3abef7d6b531c0284c06827ca4b/src/frontend/scripting/ScriptSystem.ts#L170 my users could create their own ui's with scripts. these are loaded lazily via create object url and then using importShim. |
Is the error maybe that I create object urls myself from wich I load the scripts? |
My hack to fix it atm:
|
Yes that is correct, blobs do not support relative resolution, so you need to work around that. This is not really a limitation of this project though, since |
can't you use the the relative URL as a start from where the "importShim" call is called? |
URLs are resolved to the parent - in this case the parent is a blob URL. If you try to do |
If I would not use the import shim, it would have worked. Couldn't you ignore 'blob' parent? |
here is the sandbox: https://codesandbox.io/s/base-custom-webcomponent-forked-jyv3sx?file=/test1.js if you change the "importShim" in the test1.js to import, you get the error wich the browser throws, so maybe we should unify this? |
I agree that if anything the fix would be to provide a clearer more aligned error message. |
get the following error:
when running this code:
and the javascript code (in var javascriptCode) is like this:
whats invalid on the specifier? it is relative. I would get it if I get a 404 (if my path is wrong)
The text was updated successfully, but these errors were encountered: