Ask coding questions

← Back to all posts
Hello, can somebody help me, please?
Pakuslav

When I start my bot in VSC, it run without error, but here on replit, its showing error.

/home/runner/ZovicekBOT/node_modules/reconlx/node_modules/discord.js/src/rest/RESTManager.js:33
const token = this.client.token ?? this.client.accessToken;
^

SyntaxError: Unexpected token '?'.

Does anyone know how to fix this? Thank you in advance.

Voters
Pakuslav
Comments
hotnewtop
Bunnytoes

vsc has stuff that repl doesn't for example replit doesn't have the System.Drawing; even though vsc does. This might be the answer to your problem

Pakuslav

@Bunnytoes How can I fix it?

Bunnytoes

@Pakuslav I don't know, I don't think you can fix stuff that works in vsc but doesn't in replit

Pakuslav

@Bunnytoes Okay, thanks.