" Attempt to construct staged filesystem reference from absolute path" Solution?

IF like me you do not see the $ mark after inputting rm -r UE4Game/ even after waiting a long time, try exiting any open UE4 projects first and the run the command.