Ask coding questions

← Back to all posts
How to solve SyntaxError: Unexpected token '?'
DIRTYBOOTGANG

I am currently trying to set up one of my discord bots on Replit and for some reason I keep getting this error every time I hit run. It seems to be occurring due to the token not being picked up when stored as a secret.

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
DIRTYBOOTGANG
Comments
hotnewtop
Coder100

Try installing discordjs v12 or using the bash language. The latest discordjs uses versions of node that the current node interpreter does not understand.

DIRTYBOOTGANG

I'll that a shot, thanks.
@Coder100

DIRTYBOOTGANG

It worked, thanks so much
@Coder100

Coder100