이연준
이연준

Reputation: 86

Discord.js v13 sending error. It's alright in discord.js v12. How to fix it?

I upgraded my Discord.js v12 to v13 but it send to me this error

/home/discord/project/bloodmoon/node_modules/discord.js/src/rest/APIRequest.js:33
    agent ??= new https.Agent({ ...this.client.options.http.agent, keepAlive: true });
          ^^^

SyntaxError: Unexpected token '??='

My node.js version is 16.7.0

node -v
v16.7.0

I think it's node.js problem it i can't find problem in that. what's the problem?

Upvotes: 2

Views: 1533

Answers (2)

Guinevere
Guinevere

Reputation: 49

I had the same issue and fixed it by installing the latest version of NodeJS (16.11.0 at the time I'm writing this), not the LTS version (14.x.x)

Upvotes: 1

uplifters
uplifters

Reputation: 1

To fix this update the latest version of node. Currently v16.9.1

Upvotes: 0

Related Questions