Trouble with creating c++ project (ue4, ue5)

Hi! I use unreal engine 4 and 5, I start work on Mac but I can’t create c++ project while blueprint work. Console output:
The project could not be compiled. Would you like to open it in Visual Studio Code?

Running Mono…

Running bundled mono, version: Mono JIT compiler version 5.16.0.220 (2018-06/bb3ae37d71a Fri Nov 16 17:12:11 EST 2018)
/Users/Shared/Epic Games/UE_4.27/Engine /Users/Shared/Epic Games/UE_4.27/Engine/Binaries/Mac
Creating makefile for MyProject5Editor (no existing makefile)
@progress push 5%
Parsing headers for MyProject5Editor
Running UnrealHeaderTool “/Users/User/Documents/Unreal Projects/MyProject5/MyProject5.uproject” “/Users/User/Documents/Unreal Projects/MyProject5/Intermediate/Build/Mac/x86_64/MyProject5Editor/Development/MyProject5Editor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“/Users/User/Library/Application Support/Epic/UnrealBuildTool/Log_UHT.txt” -installed
2022-10-18 23:41:35.722 UnrealHeaderTool[10707:112330] [UE4] Looking for binary: …/…/…/Engine/Programs/UnrealHeaderTool/Config/BinaryConfig.ini
LogInit: Display: Loading text-based GConfig…
Reflection code generated for MyProject5Editor in 4.9180929 seconds
@progress pop
Building MyProject5Editor…
Performing 9 actions (8 in parallel)
[1/9] Compile SharedPCH.Engine.ShadowErrors.h
In file included from /Users/User/Documents/Unreal Projects/MyProject5/Intermediate/Build/Mac/x86_64/MyProject5Editor/Development/Engine/SharedPCH.Engine.ShadowErrors.h:284:
In file included from /Users/Shared/Epic Games/UE_4.27/Engine/Source/Runtime/Engine/Public/EngineSharedPCH.h:572:
/Users/Shared/Epic Games/UE_4.27/Engine/Source/Runtime/Engine/Classes/Materials/Material.h:1279:26: error: variable ‘LayerNames’ set but not used [-Werror,-Wunused-but-set-variable]
const TArray* LayerNames = &LayersExpression->GetLayerNames();
^
1 error generated.

Ideas?