Closed snk-js closed 2 years ago
Facing the same issue. How was this resolved?
Facing the same issue. How was this resolved?
Look carefully to your imports
for me I auto imported getContext
and had it picked
import { getContext } from 'svelte/types/runtime/internal/lifecycle';
instead of the normal from 'svelte'
import
for me I auto imported
getContext
and had it pickedimport { getContext } from 'svelte/types/runtime/internal/lifecycle';
instead of the normalfrom 'svelte'
import
Worrying. Especially with the VSCode Svelte extension installed, you'd expect Intellisense to actually give proper quickhints.
Had the same issue when receiving an autocomplete from the svelte language server. Thankfully, searching for this error quickly brought me to this issue here.
@justuswilhelm is this with svelte4 or svelte3?
svelte4 types are declared differently and going to https://www.npmjs.com/package/svelte?activeTab=code types/index.d.ts you can see that getContext is there.
but https://www.npmjs.com/package/svelte/v/3.59.1?activeTab=code you can see that types/runtime/index.d.ts indeed exports it from svelte/internal which caused this issue. It should be fixed with 4
@justuswilhelm is this with svelte4 or svelte3?
I just checked my package.json and it looks like I'm still on v3. Woops! I suppose I should be upgrading soon.
Describe the bug
I started to play around with Svelte rendering graph nodes and edges using SVG, but something gone wrong or svelte may not been displaying a clear error message
line of the file and repository that occurs the error
I just imported the edge component to my Node component and that error started to pop up:
Reproduction
the file being imported in the component: https://github.com/snk-js/svelte-visualized-graph-algorithms/blob/bug/missing-export-in-svelte-package/src/components/Edge.svelte
the component that importing the Bug https://github.com/snk-js/svelte-visualized-graph-algorithms/blob/bug/missing-export-in-svelte-package/src/components/Node.svelte
Logs
System Info
Severity
blocking all usage of svelte