Home > OS >  Error for slash commands. How can I fix it?
Error for slash commands. How can I fix it?

Time:10-11

Hey I am getting this when I do:

const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');

Here is the error:

Click me to see

Any fix for this error or packages?

CodePudding user response:

Upgrade your Node.js version.

You're using a version of Node.js that doesn't support the ?? operator, which the version of Discord.js you're using does require.

The first version to support that operator is 14.0.

CodePudding user response:

I did in a .replit file: run = "npm i [email protected]" It updated. Thanks for all your help!

  • Related