Zaid-Ajaj / Feliz

A fresh retake of the React API in Fable and a collection of high-quality components to build React applications in F#, optimized for happiness
https://zaid-ajaj.github.io/Feliz/
MIT License
531 stars 77 forks source link

UseElmish: Failed to resolve import "use-sync-external-store/shim" #590

Closed Larocceau closed 6 months ago

Larocceau commented 6 months ago

I'm trying to set up Feliz.UseElmish in my SAFE app, but there seems to be a problem with the NPM dependency "use-sync-external-store/shim".

After installing and implementing UseElmish, I get the error in Vite: Failed to resolve import "use-sync-external-store/shim" from "output\fable_modules\Feliz.UseElmish.2.5.0\UseElmish.fs.js". Does the file exist?

MangelMaxime commented 6 months ago

Hello @Larocceau,

You need to install use-sync-external-store NPM packages.

If you are using femto, it can do it for you

https://github.com/Zaid-Ajaj/Feliz/blob/4ef46b8b7215fb6d11f653615b4d0cf6a7249177/Feliz.UseElmish/Feliz.UseElmish.fsproj#L12-L14

Larocceau commented 6 months ago

Oh damn, I thought paket took care of that. Thanks!

MangelMaxime commented 6 months ago

Paket only takes care of NuGet dependencies.

In general, any import errors you see coming from Node, vite, etc. are related to NPM packages