Discord.js Syntaxerror: Unexpected Token?
I'm doing the discord.js getting started bot but I always get this error: SyntaxError: Unexpected token? This is the code I used, actually just copy and paste from their tutorial
Solution 1:
So the first thing to note is that your error is coming from node_modules
. That means that the code that is erroring is code that you've imported from npm
to do something. Because it's not your code and rather third party code that probably works, that means that the error most likely has to do with either your version of that code or the way you're using that package is incorrect.
My best guess would be that it has to do with some advanced syntax that the package is using, but that errors on your machine because you have version incompatibility. I'd recommend updating your node version and trying again. Let us know if that fixes the problem!
Download latest node version: https://nodejs.org/en/download/
Post a Comment for "Discord.js Syntaxerror: Unexpected Token?"