Skip to content
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

stores don't seem to work #104

Open
chris838 opened this issue Jan 10, 2024 · 4 comments
Open

stores don't seem to work #104

chris838 opened this issue Jan 10, 2024 · 4 comments

Comments

@chris838
Copy link

Following the Svelte docs for creating a simple store, I can't import the exported variable.

@woutdp
Copy link
Owner

woutdp commented Jan 10, 2024

Can you provide the code that doesn't work?

@chris838
Copy link
Author

chris838 commented Jan 11, 2024

Hey - thanks for fast response.

I couldn't get the included example for store working either, here: https://github.com/woutdp/live_svelte/tree/master/examples

@tw00
Copy link

tw00 commented Aug 1, 2024

Any update on this?

@tw00
Copy link

tw00 commented Aug 1, 2024

I was able to narrow this down:

This works fine:

# Example.svelte
<script>
import { writable, derived } from "svelte/store";
</script>

However this breaks:

# Example.svelte
<script>
import store from "./store";
</script>
# store.js
import { writable, derived } from "svelte/store";

export default {}
✘ [ERROR] No matching export in "svelte/store.js" for import "writable"

    svelte/store.js:1:9:
      1 │ import { writable, derived } from "svelte/store";
        ╵          ~~~~~~~~

✘ [ERROR] No matching export in "svelte/store.js" for import "derived"

    svelte/store.js:1:19:
      1 │ import { writable, derived } from "svelte/store";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants