I searched for posts with similar build errors but didn’t find much information. I only came across a couple of threads where users recommend installing MSVC v143 – VS 2022 C++ x64/x86 build tools (v14.38–17.8), as that version seems to work fine with Unreal 5.4.
Some people also suggest trying Unreal 5.3 or 5.5, since they mentioned 5.4 was giving them build errors, although I didn’t find any official post confirming known issues with that version.
So, you could also try building in one of those versions, or even 5.6, and if it still fails, it’s probably something related to folder naming or your Unreal configuration.
When it fails to build a new project, what log does it show you?