-
Notifications
You must be signed in to change notification settings - Fork 304
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
Fable
freezing with --run vite
#3631
Comments
Hum, this kind of issue remind me of the system being out of inotify watcher but I think it was happening to me on Linux. Can you reproduce without running vite? Can you also try to use set Vite to use polling? https://vitejs.dev/config/server-options.html#server-watch Could you please try to use set |
After a few minutes of testing, I can confirm that:
Based on that, I suspect the problem is with running |
I confirm - running |
Fable
freezing with Vite.js
Fable
freezing with --run vite
Thank you for sharing the work around. I am not sure why there is a problem when running it via Fable. In theory Fable, just spawn the process and forget about it especially on Unix system where we don't need to kill the child process ourself compared to windows. |
I am experiencing the same problem but I have also also when running the processes separately... |
Does running with |
I feel like my problem is more related to my build project. I am running the processes from an F# project to orchestrate everything. And was noticing some strange overlapping in the console output. I am using a combination of SimpleExec and Async.Parallel
[
// Command.RunAsync("npx", "vite") |> Async.AwaitTask
Command.RunAsync("npx",
CmdLine.empty
|> CmdLine.appendRaw "nodemon"
|> CmdLine.appendPrefix "-e" "module.scss"
|> CmdLine.appendPrefix "--exec" Build.fcmCommand
|> CmdLine.toString
) |> Async.AwaitTask
Command.RunAsync(
"dotnet",
CmdLine.empty
|> CmdLine.appendRaw "fable"
|> CmdLine.appendRaw "watch"
|> CmdLine.appendRaw "src/tk.Client/tk.Client.fsproj"
|> CmdLine.appendRaw "--sourceMaps"
|> CmdLine.appendRaw "--noCache"
|> CmdLine.appendRaw "--run"
|> CmdLine.appendRaw "npx vite"
|> CmdLine.toString
)
|> Async.AwaitTask
]
|> Async.RunSynchronously
|> ignore
What is strange is that I think did similar things in the past without problems. Also running the processus separately using "scripts": {
"build-css-modules": "npx fcm ./src/tk.Client/ --outFile src/tk.Client/CssModules.fs",
"watch-fable": "dotnet fable watch ./src/tk.Client/ --sourceMaps",
"watch-css-modules": "npx nodemon -e module.scss --exec pnpm run build-css-modules",
"watch-vite": "npx vite",
"watch": "pnpm run build-css-modules && npx concurrently --kill-others \"npm:watch-*\""
}, |
Same here; Ubuntu 22.04.3 LTS |
Another command which fix this issue is to run Fable in verbose mode:
We believe the issue is that both Fable and Vite are rewriting the console history and this is causing an issue somewhere. Using |
FYI, I have the same issue so I tried the "experimental" vite-plugin-fable and it’s been working great so far. It’s perfect for a Fable + Vite stack. |
Description
Hi,
After upgrading from
Webpack
toVite.js
, I've noted thatFable
freezes duringHMR/Fast-Refresh
. The problem is critical because it happens quite often for big projects/files (like my production application).I've been able to reproduce the error for a small project:
Repro code
The video shows the problem:
fable_freeze.mp4
You can see that at some point
Fable
stops responding with the last message ofStarted fable compilation...
, however, Vite and the application still work.Related information
4.5.0
Mac OS 14 Sonoma
The text was updated successfully, but these errors were encountered: