Pollo
Pollo2y ago

I cant import the Zustand module from deno.

I leave a photo of what it shows when I put the url to the import map. And try to cache the module.
13 Replies
Pollo
PolloOP2y ago
I also tryed use npm: but i cant import the vanilla relative path.
SyrupThinker
SyrupThinker2y ago
If you want to import the index.ts with plain zustand the import map should point to the https://deno.land/x/zustand@v4.4.0/src/index.ts file. For the vanilla import you also need to point to the actual file, so
import {} from "zustand/src/vanilla.ts";
import {} from "zustand/src/vanilla.ts";
Pollo
PolloOP2y ago
Nice Thanks, i guess is full fixed. let me test it a bit to close this 😄
Pollo
PolloOP2y ago
Pollo
PolloOP2y ago
I got this ^^
Pollo
PolloOP2y ago
Pollo
PolloOP2y ago
If i take off the first line. no more error. But i would like to use the useStore What libraries do you guys use with preact to handle stores?
SyrupThinker
SyrupThinker2y ago
Hmm ok, that file is not a proper ES module. Let's go with npm, does npm:zustand@4.4 and npm:zustand@4.4/vanilla work for you, or how does it fail?
What libraries do you guys use with preact to handle stores?
Can't help with that, gotta hope somebody else sees this or just ask in #fresh I guess 🤷‍♂️
Pollo
PolloOP2y ago
let me test it.. and about the libraries, ill go ask in fresh 🙂 Im just trying things nothing "real" xd
Pollo
PolloOP2y ago
I got this.
Pollo
PolloOP2y ago
Is just a hook, so no problem without using it. I can use zustand without that Thanks for the help, i have to close this thread or something ???
SyrupThinker
SyrupThinker2y ago
No problem, you don't have to, but you can add the "Solved" tag to the thread.
Pollo
PolloOP2y ago
Ready 🙂

Did you find this page helpful?