Ok I had the problem " .uproject does not look like uproject file but no targets have been found " when packaging for linux in a linux machine, and I fixed it, all I did was run the editor from like
“UE4Editor” or UnrealEditor in UE5 “Executables” Then browse the .uproject of your project and run it, and that is a way to fix it, there can be similar ways to fix it on other Operating systems such as windows 11 or windows 11 or macOS…