Skip to content

System.IO.DirectoryNotFoundException on first dotnet runΒ #1

@theimowski

Description

@theimowski

Hi @AngelMunoz I've been brought here from SAFE-Stack/SAFE-template#532 and wanted to give Perla a shot. For some reason when I do dotnet run on a fresh repository, following exception is thrown:

...
server: /Users/theimowski/oss/AngelMunoz/SafePerla/src/Server> dotnet watch run
client: /Users/theimowski/oss/AngelMunoz/SafePerla/src/Client> dotnet perla serve
/Users/theimowski/oss/AngelMunoz/SafePerla/src/Server> "dotnet" watch run (In: false, Out: true, Err: true)
/Users/theimowski/oss/AngelMunoz/SafePerla/src/Client> "dotnet" perla serve (In: false, Out: true, Err: true)
client: Perla: Checking whether esbuild is present...
client: Perla: esbuild is present.
client: Perla:Serve: Starting Dev Server
client: Perla:Serve: Starting Fable
client: Unhandled exception. System.IO.DirectoryNotFoundException: /Users/theimowski/oss/AngelMunoz/SafePerla/src/Client/output/
client:    at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
client:    at Perla.Lib.Server.devServer(PerlaConfig config) in /Users/tuna/repos/Perla/src/Perla.Lib/Server.fs:line 656
client:    at Perla.Lib.Server.startServer(PerlaConfig config) in /Users/tuna/repos/Perla/src/Perla.Lib/Server.fs:line 706
client:    at Perla.Lib.Server.serverActions@724-1.Invoke(Unit unitVar) in /Users/tuna/repos/Perla/src/Perla.Lib/Server.fs:line 725
client:    at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 508
client:    at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112
client: --- End of stack trace from previous location ---
client:    at Microsoft.FSharp.Control.AsyncPrimitives.Start@1167-1.Invoke(ExceptionDispatchInfo edi) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1167
client:    at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112
client:    at <StartupCode$FSharp-Core>.$Async.clo@193-15.Invoke(Object o) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 195
client:    at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
client:    at System.Threading.ThreadPoolWorkQueue.Dispatch()
client:    at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
client:    at System.Threading.Thread.StartCallback()
server: dotnet watch πŸš€ Started
...

interestingly, after I cancel the run, the directory is there and subsequent dotnet run works fine - smells like some kind of race condition possibly?
I'm using MacOS FWIW

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions