unknown error when trying to package project

here is the output log:

LogSlate: Window ‘Message Log’ being destroyed
LogSlate: Window ‘Message Log’ being destroyed
LogAudioMixer: Display: Audio Buffer Underrun (starvation) detected.
UATHelper: Cooking (Windows (64-bit)): Running AutomationTool…
UATHelper: Cooking (Windows (64-bit)): Parsing command line: -ScriptsForProject=C:/Users/brady/Music/HNUE4Tutorials/HNproto.uproject BuildCookRun -nocompileeditor -installed -nop4 -project=C:/Users/brady/Music/HNUE4Tutorials/HNproto.uproject -cook -skipstage -ue4exe=“C:\Program Files\Epic Games\UE_4.27\Engine\Binaries\Win64\UE4Editor-Cmd.exe” -targetplatform
=Win64 -ddc=InstalledDerivedDataBackendGraph -utf8output
UATHelper: Cooking (Windows (64-bit)): Setting up ProjectParams for C:\Users\brady\Music\HNUE4Tutorials\HNproto.uproject
UATHelper: Cooking (Windows (64-bit)): HNproto.uproject requires a temporary target.cs to be generated (ApexDestruction plugin is enabled)
UATHelper: Cooking (Windows (64-bit)): While compiling C:\Users\brady\AppData\Local\Temp\UAT\C+Program+Files+Epic+Games+UE_4.27\Rules\UATRules-2019982772.dll:
UATHelper: Cooking (Windows (64-bit)): c:\Users\brady\Music\HNUE4Tutorials\Intermediate\Source\hello neighbor prototype.Target.cs(3,20) : error CS1514: { expected
UATHelper: Cooking (Windows (64-bit)): c:\Users\brady\Music\HNUE4Tutorials\Intermediate\Source\hello neighbor prototype.Target.cs(3,45) : error CS1002: ; expected
UATHelper: Cooking (Windows (64-bit)): c:\Users\brady\Music\HNUE4Tutorials\Intermediate\Source\hello neighbor prototype.Target.cs(4,1) : error CS1519: Invalid token ‘{’ in class, struct, or interface member declaration
UATHelper: Cooking (Windows (64-bit)): c:\Users\brady\Music\HNUE4Tutorials\Intermediate\Source\hello neighbor prototype.Target.cs(5,24) : error CS1002: ; expected
UATHelper: Cooking (Windows (64-bit)): c:\Users\brady\Music\HNUE4Tutorials\Intermediate\Source\hello neighbor prototype.Target.cs(5,59) : error CS1002: ; expected
UATHelper: Cooking (Windows (64-bit)): c:\Users\brady\Music\HNUE4Tutorials\Intermediate\Source\hello neighbor prototype.Target.cs(5,72) : error CS1519: Invalid token ‘)’ in class, struct, or interface member declaration
UATHelper: Cooking (Windows (64-bit)): c:\Users\brady\Music\HNUE4Tutorials\Intermediate\Source\hello neighbor prototype.Target.cs(7,8) : error CS1519: Invalid token ‘=’ in class, struct, or interface member declaration
UATHelper: Cooking (Windows (64-bit)): c:\Users\brady\Music\HNUE4Tutorials\Intermediate\Source\hello neighbor prototype.Target.cs(7,25) : error CS1519: Invalid token ‘;’ in class, struct, or interface member declaration
UATHelper: Cooking (Windows (64-bit)): c:\Users\brady\Music\HNUE4Tutorials\Intermediate\Source\hello neighbor prototype.Target.cs(8,23) : error CS1519: Invalid token ‘(’ in class, struct, or interface member declaration
UATHelper: Cooking (Windows (64-bit)): c:\Users\brady\Music\HNUE4Tutorials\Intermediate\Source\hello neighbor prototype.Target.cs(10,1) : error CS1022: Type or namespace definition, or end-of-file expected
UATHelper: Cooking (Windows (64-bit)): ERROR: Unable to compile source files.
UATHelper: Cooking (Windows (64-bit)): (see C:\Users\brady\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.27\Log.txt for full exception trace)
PackagingResults: Error: Unable to compile source files.
UATHelper: Cooking (Windows (64-bit)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Cooking (Windows (64-bit)): BUILD FAILED

Hello there @RunBobFunStudios!

Checking through your log, there are naming convention errors present in the following lines:

error CS1514: { expected
error CS1002: ; expected
error CS1519: Invalid token ...
error CS1022: Type or namespace definition, or end-of-file expected

This means that the problem is due invalid characters in your project name, “hello neighbor prototype”, most likely the spaces included. UE tries to generate a target for hello neighbor prototype.Target.cs, then C# compilation fails due reading the invalid syntax.

The most clear solution here is to rename your project, to something like “HelloNeighborPrototype”, then clear the cache, via deleting the Intermediate and Binaries folders from your main directory. After that, re-generate your project files in VS, and launch/pack your project again. Hope this helps!