vite-plugin-fable icon indicating copy to clipboard operation
vite-plugin-fable copied to clipboard

missing dotnet-sdk8 (or even only runtime) - plugin silently fails after starting up

Open jkone27 opened this issue 7 months ago • 3 comments

would be better to warn user if dotnet-sdk 8 is not installed, as for now if missing and no runtime is found, Fable.Daemon silently fails to compile and plugin hangs

bun run dev                                            
$ VITE_DEBUG=true vite
11:44:14 PM [vite] [fable]: configResolved: Configuration: Debug
11:44:14 PM [vite] [fable]: configResolved: Entry fsproj ./src/MyVueApp.fsproj
11:44:14 PM [vite] [fable]: buildStart: Starting daemon
11:44:14 PM [vite] [fable]: buildStart: Initial project file change!
11:44:15 PM [vite] [fable]: projectChanged: dependent file ./src/MyVueApp.fsproj changed.
11:44:15 PM [vite] [fable]: compileProject: Full compile started of ./src/MyVueApp.fsproj
11:44:15 PM [vite] [fable]: compileProject: fable-library located at /Users/mac/Repositories/feliz-vue/sample/my-vue-app/node_modules/@fable-org/fable-library-js
11:44:15 PM [vite] [fable]: compileProject: about to type-checked ./src/MyVueApp.fsproj.
➜ ➜ ➜ ➜ ➜ ⚠️ hangs indefinitely (no msg)

here what I changed to make it work (had a new Mac installation)

➜  my-vue-app git:(main) ✗ dotnet --list-sdks    
8.0.410 [/usr/local/share/dotnet/sdk] <<<<<<
9.0.300 [/usr/local/share/dotnet/sdk]
➜  my-vue-app git:(main) ✗ dotnet --list-runtimes
Microsoft.AspNetCore.App 8.0.16 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] <<<<<<<
Microsoft.AspNetCore.App 9.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.16 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] <<<<<<< 
Microsoft.NETCore.App 9.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

for Mac users: brew tap isen-ng/dotnet-sdk-versions brew install --cask dotnet-sdk8

jkone27 avatar May 27 '25 21:05 jkone27

relates to https://github.com/fable-compiler/vite-plugin-fable/pull/46 which should now allow for higher versions

jkone27 avatar Jun 24 '25 13:06 jkone27

as an idea, maybe the plugin could run dotnet --list-runtimes at startup as pre check and verify if at least 8.x is installed?

jkone27 avatar Oct 30 '25 22:10 jkone27

Prechecks are a good idea, but avoid running them every time. Write a small marker file to disk and skip the check on subsequent runs.

nojaf avatar Oct 31 '25 07:10 nojaf