Uncaught SyntaxError: Unexpected token <

So this isn’t apart of the freecodecamp course, but I have used freecodecamp for a while now and thought this would be a good place to look for help.

I have searched around and have seen loads of people with the same problem, however, they are all getting it in a different way. I am using Express and whenever I try to link an external javascript script in my ejs files I get a “Uncaught SyntaxError: Unexpected token <” error. The javascript is valid and I am serving to the “public” directory where the file is. I can get around this with in file tags however I would rather not do that. Any help would be appreciated!+

javascript file: https://pastebin.com/iuBu7jzj
ejs file: https://pastebin.com/Kipk4FzU