Pollo
Pollo16mo 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
PolloOP16mo ago
I also tryed use npm: but i cant import the vanilla relative path.
SyrupThinker
SyrupThinker16mo 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
PolloOP16mo ago
Nice Thanks, i guess is full fixed. let me test it a bit to close this 😄
Pollo
PolloOP16mo ago
Pollo
PolloOP16mo ago
I got this ^^
Pollo
PolloOP16mo ago
Pollo
PolloOP16mo 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
SyrupThinker16mo 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
PolloOP16mo ago
let me test it.. and about the libraries, ill go ask in fresh 🙂 Im just trying things nothing "real" xd
Pollo
PolloOP16mo ago
I got this.
Pollo
PolloOP16mo 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
SyrupThinker16mo ago
No problem, you don't have to, but you can add the "Solved" tag to the thread.
Pollo
PolloOP16mo ago
Ready 🙂