heres the code (its just a bot i started making) index.js
const Discord = require("discord.js")
const client = new Discord.Client();
client.on('ready', () => {
console.log('Logged in!');
});
var TOKEN = process.env['YOUR_TOKEN_HERE']
client.login(TOKEN);
the var TOKEN =... used to be const but i figured if i made it a var it would work. it did not and im not even sure what the error is about. other then that i just dont know what to do.

Your code isn't up to date with the latest discord.js version which I assume you are on v14, refer to the official discord.js guide. Alternatively, refer to the discord.js documentation for ClientOptions, the arguments passed to the constructor (
new Discord.Client(ClientOptions here)). This documentation specifies that theintentsfield is non-optional, which is specified in the error.As such, you need to specify which intents you are using for example