所以,我安装了Node.js,现在当我尝试安装Mongoosejs时,我收到一个错误,告诉我我没有所需的Node.js版本(我需要v0.4.11和v0.4.12).
我该如何升级到这个版本?我想我可以用最新版本再次安装它,但我不想在确定我的项目文件夹"node"中的项目文件夹不会被删除之前这样做.
我刚刚将 Discord.js 从 v13 更新到 v14,但有很多错误。
message和事件的错误interaction:
message事件也都没有发生interaction。
意图错误:
const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
],
});
// Intents.FLAGS.GUILDS,
// ^
//
// TypeError: Cannot read properties of undefined (reading 'FLAGS')
const client = new Client({
intents: ['GUILDS', 'GUILD_MEMBERS', 'GUILD_MESSAGES'],
});
// throw new RangeError(ErrorCodes.BitFieldInvalid, bit);
//
// RangeError [BitFieldInvalid]: Invalid bitfield flag or number: GUILDS.
Run Code Online (Sandbox Code Playgroud)
s的错误interaction:
if (interaction.isCommand()) {}
// TypeError: interaction.isCommand is not a function
if …Run Code Online (Sandbox Code Playgroud)