Cannot build a specflow template

Hello, everyone.
Question: Why is the project not building?
I created a specflow project template for dotnet with the following command: dotnet new specflowproject --unittestprovider nunit --framework net6.0. Performed: dotnet clean, dotnet restore, dotnet build. However, I get the errors below. On a Windows machine performing the same actions does not have these problems. I get the feeling it has more to do with the environment itself, but I’m not sure.


Repl link: https://replit.com/@AlberDoran/SpecFlow

/home/runner/SpecFlow/Features/Calculator.feature.cs(13,28): error CS0116: A namespace cannot directly contain members such as fields, methods or statements [/home/runner/SpecFlow/SpecFlow-is-crap.csproj]
/home/runner/SpecFlow/Features/Calculator.feature.cs(13,19): error CS1514: { expected [/home/runner/SpecFlow/SpecFlow-is-crap.csproj]
/home/runner/SpecFlow/Features/Calculator.feature.cs(13,20): error CS1022: Type or namespace definition, or end-of-file expected [/home/runner/SpecFlow/SpecFlow-is-crap.csproj]
/home/runner/SpecFlow/Features/Calculator.feature.cs(14,1): error CS1022: Type or namespace definition, or end-of-file expected [/home/runner/SpecFlow/SpecFlow-is-crap.csproj]
/home/runner/SpecFlow/obj/Debug/net6.0/NUnit.AssemblyHooks.cs(12,22): error CS1514: { expected [/home/runner/SpecFlow/SpecFlow-is-crap.csproj]
/home/runner/SpecFlow/obj/Debug/net6.0/NUnit.AssemblyHooks.cs(12,22): error CS1513: } expected [/home/runner/SpecFlow/SpecFlow-is-crap.csproj]
/home/runner/SpecFlow/obj/Debug/net6.0/NUnit.AssemblyHooks.cs(12,22): error CS8803: Top-level statements must precede namespace and type declarations. [/home/runner/SpecFlow/SpecFlow-is-crap.csproj]
/home/runner/SpecFlow/obj/Debug/net6.0/NUnit.AssemblyHooks.cs(12,23): error CS1525: Invalid expression term 'is' [/home/runner/SpecFlow/SpecFlow-is-crap.csproj]
/home/runner/SpecFlow/obj/Debug/net6.0/NUnit.AssemblyHooks.cs(12,49): error CS1002: ; expected [/home/runner/SpecFlow/SpecFlow-is-crap.csproj]
/home/runner/SpecFlow/obj/Debug/net6.0/NUnit.AssemblyHooks.cs(16,5): error CS0106: The modifier 'public' is not valid for this item [/home/runner/SpecFlow/SpecFlow-is-crap.csproj]
/home/runner/SpecFlow/obj/Debug/net6.0/NUnit.AssemblyHooks.cs(18,46): error CS1026: ) expected [/home/runner/SpecFlow/SpecFlow-is-crap.csproj]