sites
sites copied to clipboard
Import issues with Svelte REPL
Describe the bug
I am able to use old versions of svelte-query in https://svelte.dev/repl/ using the following import:
import { QueryClient, useQuery } from '@sveltestack/[email protected]';
However if I try to import a newer version like @1.6.0
I see errors like
Error: Could not load https://unpkg.com/[email protected]/index.js (imported by https://unpkg.com/[email protected]/dist/esnode/methods/node.js): Cannot find "/index.js" in [email protected]
I'm not sure if this is an issue with the REPL, unpkg.com, or svelte-query, but as older versions work I think it will at least partially involve changes here.
Reproduction
- Open a new REPL
- add
import { QueryClient, useQuery } from '@sveltestack/[email protected]'
- watch for console errors
https://svelte.dev/repl/be8980cad4244f72b6eae7b6ab726c1c
Logs
Error
at R (index.3fa06cef.js:21:834)
at tn (index.3fa06cef.js:51:3364)
at index.3fa06cef.js:51:21283
at async tc (index.3fa06cef.js:51:4123)
at async ic.addModuleSource (index.3fa06cef.js:51:9326)
Mp @ index.3fa06cef.js:60
Error: Could not load https://unpkg.com/[email protected]/index.js (imported by https://unpkg.com/[email protected]/dist/esnode/methods/node.js): Cannot find "/index.js" in [email protected]
at index.3fa06cef.js:60:1469
at async Object.load (index.3fa06cef.js:60:2977)
at async index.3fa06cef.js:51:8510
at async Zu.work (index.3fa06cef.js:51:2752)
Mp @ index.3fa06cef.js:60
System Info
This is in the REPL, and the browser shouldn't make a difference, but my user agent is
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36
Severity
annoyance