Skip to content
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

"Exited with error code 137" on Mac M1 MacOS 14.4 (23E214) when dotnet watch run #51

Open
toraritte opened this issue Mar 27, 2024 · 1 comment
Labels

Comments

@toraritte
Copy link

toraritte commented Mar 27, 2024

No matter what dotnet new giraffe flags I use, the result is the same:

$ dotnet new giraffe -o WithTemplate
The template "Giraffe" was created successfully.

$ cd WithTemplate/
$ dotnet watch run
dotnet watch 🚀 Started
dotnet watch ❌ Exited with error code 137
dotnet watch ⏳ Waiting for a file to change before restarting dotnet...

Completely new to ASP.NET Core (and .NET in general), so I tried the tutorial on Get started with ASP.NET Core | Microsoft Learn, and it worked.

Then I did the manual approach, but that one worked too:

$ dotnet new sln -o ByHand
The template "Solution File" was created successfully.

$ cd ByHand
$ dotnet new web -lang "F#" -o src/ByHand
The template "ASP.NET Core Empty" was created successfully.

Processing post-creation actions...
Restoring /Users/toraritte/dev/shed/dotnet/giraffe/ByHand/src/ByHand/ByHand.fsproj:
  Determining projects to restore...
  Restored /Users/toraritte/dev/shed/dotnet/giraffe/ByHand/src/ByHand/ByHand.fsproj (in 1.09 sec).
Restore succeeded.

$ dotnet sln add src/ByHand/ByHand.fsproj 
Project `src/ByHand/ByHand.fsproj` added to the solution.

$ cd src/ByHand/
$ dotnet add package Microsoft.AspNetCore.App
$ dotnet add package Giraffe
  Determining projects to restore...
/usr/local/share/dotnet/sdk/8.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.Shared.targets(111,5): warning NETSDK1080: A PackageReference to Microsoft.AspNetCore.App is not necessary when targeting .NET Core 3.0 or higher. If Microsoft.NET.Sdk.Web is used, the shared framework will be referenced automatically. Otherwise, the PackageReference should be replaced with a FrameworkReference. [/Users/toraritte/dev/shed/dotnet/giraffe/ByHand/src/ByHand/ByHand.fsproj]

Opened up Program.fs, and pasted the "more functional way" example from https://giraffe.wiki/#doing-it-manually, then

$ dotnet watch run

Did I miss something in the README?

@64J0 64J0 added the bug label May 4, 2024
@64J0
Copy link
Member

64J0 commented May 4, 2024

Hi @toraritte, thanks for opening this issue.

I was not able to validate locally since I don't have a mac, but maybe this @dbrattli's PR will fix this problem (PR link).

One of the points mentioned in the PR description is:

  • Don't append .App to assembly name since that crashes when running on Mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants