An item with the same key has already been added

Hello! I am new to programming in Unreal Engine and I am just finish up my first project but when I try to package it I get this error:
ERROR: System.ArgumentException: An item with the same key has already been added.
I have looked what other people have done to solve this issue but noone of it seems to be working for me. I’ve looked in my Source folder and there I have a .Target.cs and a Editor.Target.cs
I’ve tried removing one of them but I still get the same error. If I remove both however I get another error message:
ERROR: Only staged builds can be paked, use -stage or -skipstage.
These errors occur both when I use the File > Package project and when I use the Window > Project Launcher with a standard launch profile.
If someone could shed some light on what I could do to solve this I would be very grateful. Cheers!

Is there any further information in the logs around that error? It’s not one I’ve seen myself but my guesses would be to look at any plugins you’re using to see if there are any issues there, and also try completely removing the Intermediate, Saved and Binaries folders then trying another build

In the end of the log it directs me to a txt file for a “full exception trace” I could not attatch it to my comment apparenty since .txt was apparently a invalid file format(?). I’m not currently using any plugins. I tried removing those folders but the same error occured. Also, my Character blueprint defaulted to mobile input it would seem since it does no longer respond to keyboard inputs and there are some errors in that blueprint.Here is the entire log from the project launcher

also, when I try to open the .uproject shortcut it says that the module UE4Editor-Project.dll is missing or built with a different engine version and prompts me to rebuild it. All of my work however has been done on 4.19 so that should not be a problem. Could these things be connected?