Skip to content
Does anyone else have this issue?
Profile icon
Primebreaker

Ever since I updated my discord bot from discord.js version 12 to discord.js version 13, it has not allowed me to start my bot. It logs an error that points to a file within node_modules that I cannot see.

Error: SyntaxError: Unexpected token '?'

Does anyone have a fix or know why this is happening?

You are viewing a single comment. View All
Answered by JustCoding123 [earned 5 cycles]
View Answer
Profile icon
Primebreaker

@JustCoding123

/home/runner/Bot-2/node_modules/discord.js/src/rest/RESTManager.js:32
const token = this.client.token ?? this.client.accessToken;
^

SyntaxError: Unexpected token '?'