You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updating fable to 5.0.alpha-19 eliminated this issue. Thanks to the person who suggested this. But for any first timers with fable, the default really deserves to work.
@goswinr For me 4.28 works as expected with .NET 10 or .NET 8.
This version add supports for .NET 10, so it cannot be replaced by a previous version.
For this reason, I don't think I can unlist it. It seems like previous version of Fable are also impacted by this bug, but I can't see a reason why this is happening. And as I cannot reproduce the issue, I can't investigate it ... 😕
It could be of great help if someone having the bug with Fable 4.28 could try to run/debug Fable from the fable4 branch. The first steps could be to see if they are able to compile against the quicktest project (command should be ./build.sh quicktest javascript, you can refers to ./build.sh --help)
Specifically, it's the invocation of cmd /C that's the issue. If I do that myself, cmd doesn't terminate. dotnet restore does terminate if I don't bother using cmd /C.
Windows 10 or 11. Happens regardless of using cmd, git bash or cursor's ai choice of shell. But i think the clesr culprit is how cmd /C works. Maybe its related to the setting that has terminals not close when finished until you press a key. Maybe this could be fixed by just running dotnet tools without invoking cmd to run it.
I suspect the reason why we are using cmd /C is because it is often written that we need to use that in order to run .bat or .cmd files.
However, when I was on Windows I almost never needed to manually call cmd /C myself, I don't know if this was because I was already in a terminal or not however.
Trying to remove cmd /C when running dotnet fable watch --run vite surfaced an issue where we tried to run ../node_modules/.bin/vite
Cannot run: An error occurred trying to start process '..\node_modules.bin\vite' with working directory 'C:\Users\mmangel\Workspaces\Github\fable-compiler\template-gitpod-fable-4-vite-react\src'. The specified executable is not a valid application for this OS platform.
This is because --run CLI options tries to resolve the NPM executable:
Personally, I always found --run and the fact that we try to be smart in the executable resolution a not too good idea.
IHMO --run XXX should be equivalent as running XXX in the terminal.
So in the case of the command above people should use dotnet fable watch --run npx vite. Because, npx is globally available is knows how to resolve to find vite executable either locally, globally or from the network.
Changing this behavior would be a breaking change, so we need to be sure of us. For Fable 5, we can make the decision more or less easily because this is already a new major version.
But it seems like we don't have the issue with Fable 5, as you said moving to Fable 5 fixed the problem...
@abaljeu You mean if you run cmd /C dotnet restore it does not terminate but if you do dotnet restore it does ?
Yes
What I don't understand is that on my Windows machine, I am not able to reproduce this issue in CMD or PowerShell terminal. 🤔
This could be important: I'm inside a vscode terminal. Should have mentioned that up front. I might be able to work around the issue by changing the context of the command. instead of dotnet fable maybe i can execute fable more directly. Possibly the issue is mishandling of stdin/stdout on the embedded xterm, relative to what cmd.exe expects. Possibly a workaround is redirecting stdin/out.
I was having this problem myself, and was diving deep into the weeds (to provide as much useful detail as possible in the thread here).
... then I noticed, after downgrading to 4.27, that it wasn't hanging, but it did complain that it couldn't parse my .fsproj file. Hmm 🤔
So I went in there and changed TargetFramework from net10.0 to net8.0 ... and not only does that work with 4.27, but it also fixes the problem with 4.29 hanging! 😮
(net9.0 also works)
I can still provide some of the original problem-detail I was going to post, but for my purposes this is a very acceptable fix.
As Fable 5, will soon be released as stable I encourage people to use that version or to the fix mentioned by @dewf by downgrading the TargetFramework version.
Activity
abaljeu commentedon Jan 5, 2026
Updating fable to 5.0.alpha-19 eliminated this issue. Thanks to the person who suggested this. But for any first timers with fable, the default really deserves to work.
MangelMaxime commentedon Jan 6, 2026
Hello,
What version of .NET are you using?
abaljeu commentedon Jan 6, 2026
10.0.101
MangelMaxime commentedon Jan 7, 2026
I am not able to reproduce locally.
Something that is strange in your output is this line:
Thanks to the contributor! @ncave =true -p:in theory you should have something like:
But I don't know what could be the cause of that here.
goswinr commentedon Jan 29, 2026
In #4176 (comment)
4.28also doesn't exit. maybe4.28should be deprecated ? @MangelMaximeGraanJonlo commentedon Jan 29, 2026
I am having the exact same issue with 4.5.0
ag2uinsure commentedon Jan 29, 2026
*4.2.8
No problem if I downgrade to 4.2.7
MangelMaxime commentedon Jan 29, 2026
@goswinr For me 4.28 works as expected with .NET 10 or .NET 8.
This version add supports for .NET 10, so it cannot be replaced by a previous version.
For this reason, I don't think I can unlist it. It seems like previous version of Fable are also impacted by this bug, but I can't see a reason why this is happening. And as I cannot reproduce the issue, I can't investigate it ... 😕
It could be of great help if someone having the bug with Fable 4.28 could try to run/debug Fable from the
fable4branch. The first steps could be to see if they are able to compile against thequicktestproject (command should be./build.sh quicktest javascript, you can refers to./build.sh --help)MangelMaxime commentedon Jan 29, 2026
Just in case, which operating system are you all using ? Windows? Mac? Linux?
goswinr commentedon Jan 29, 2026
win 11, but I am on 5.22 now. where all is good, so it's not critcal to me
abaljeu commentedon Feb 13, 2026
Specifically, it's the invocation of cmd /C that's the issue. If I do that myself, cmd doesn't terminate. dotnet restore does terminate if I don't bother using cmd /C.
MangelMaxime commentedon Feb 13, 2026
@abaljeu You mean if you run
cmd /C dotnet restoreit does not terminate but if you dodotnet restoreit does ?MangelMaxime commentedon Feb 13, 2026
@abaljeu What terminal are you using to run Fable from?
Is it
cmd,powershell,git bash, etc. ?abaljeu commentedon Feb 13, 2026
Windows 10 or 11. Happens regardless of using cmd, git bash or cursor's ai choice of shell. But i think the clesr culprit is how cmd /C works. Maybe its related to the setting that has terminals not close when finished until you press a key. Maybe this could be fixed by just running dotnet tools without invoking cmd to run it.
abaljeu commentedon Feb 13, 2026
Yes
MangelMaxime commentedon Feb 13, 2026
Hum 🤔
I suspect the reason why we are using
cmd /Cis because it is often written that we need to use that in order to run.bator.cmdfiles.However, when I was on Windows I almost never needed to manually call
cmd /Cmyself, I don't know if this was because I was already in a terminal or not however.Trying to remove
cmd /Cwhen runningdotnet fable watch --run vitesurfaced an issue where we tried to run../node_modules/.bin/viteThis is because
--runCLI options tries to resolve the NPM executable:Personally, I always found
--runand the fact that we try to be smart in the executable resolution a not too good idea.IHMO
--run XXXshould be equivalent as runningXXXin the terminal.So in the case of the command above people should use
dotnet fable watch --run npx vite. Because,npxis globally available is knows how to resolve to findviteexecutable either locally, globally or from the network.Changing this behavior would be a breaking change, so we need to be sure of us. For Fable 5, we can make the decision more or less easily because this is already a new major version.
But it seems like we don't have the issue with Fable 5, as you said moving to Fable 5 fixed the problem...
What I don't understand is that on my Windows machine, I am not able to reproduce this issue in CMD or PowerShell terminal. 🤔
abaljeu commentedon Feb 14, 2026
This could be important: I'm inside a vscode terminal. Should have mentioned that up front. I might be able to work around the issue by changing the context of the command. instead of dotnet fable maybe i can execute fable more directly. Possibly the issue is mishandling of stdin/stdout on the embedded xterm, relative to what cmd.exe expects. Possibly a workaround is redirecting stdin/out.
dewf commentedon Mar 16, 2026
I was having this problem myself, and was diving deep into the weeds (to provide as much useful detail as possible in the thread here).
... then I noticed, after downgrading to 4.27, that it wasn't hanging, but it did complain that it couldn't parse my .fsproj file. Hmm 🤔
So I went in there and changed
TargetFrameworkfromnet10.0tonet8.0... and not only does that work with 4.27, but it also fixes the problem with 4.29 hanging! 😮(
net9.0also works)I can still provide some of the original problem-detail I was going to post, but for my purposes this is a very acceptable fix.
MangelMaxime commentedon Mar 16, 2026
@dewf Does Fable RC works for you?
dewf commentedon Mar 16, 2026
@MangelMaxime yes, 5.0.0-rc.3 works with the
net10.0.fsproj as well.MangelMaxime commentedon Mar 16, 2026
Thank you for confirming.
As Fable 5, will soon be released as stable I encourage people to use that version or to the fix mentioned by @dewf by downgrading the
TargetFrameworkversion.MangelMaxime commentedon Jun 29, 2026
Fable 5 has been release as stable.
If the issue still happens feel free to re-open
Split the Fable version by platform so all three release builds work
Split the Fable version by platform so all three release builds work