Discord bot does not start

I’m creating my first discord bot while following their guide. When launching the bot with: node index.js. This returns: “ReferenceError: FinalizationRegistry is not defined”. Has anyone else encountered this problem while following their guide. Here’s the code from the guide. index.js

const { Client, Intents } = require('discord.js');
const { token } = require('./config.json');

const client = new Client({ intents: [Intents.FLAGS.GUILDS] });

client.once('ready', () => {
    console.log('Ready!');
});

client.login(token);

config.json

{
    "token": "my token is here"
}

Answer

You need to be on version 16.x for Discord.js >=v13.