Skip to main content

Common Errors

The most common errors we hear everyday are listed here to help everyone. If you can't find a common error or its solution, please make a pull request or issue.


ERR_MODULE_NOT_FOUND

CustomError: Cannot find module '/project/secret' imported from '/project/index.ts'

Solution

Read here


SyntaxError: The requested module does not provide an export named

import { ArgsOf, Client } from 'discordx';
^^^^^
SyntaxError: The requested module 'discordx' does not provide an export named 'ArgsOf'

Solution

Use import type. Read it in depth.

import type { ArgsOf } from "discordx";
import { Client } from "discordx";

Slash: Missing Access

      throw new DiscordAPIError(data, res.status, request);
^

DiscordAPIError: Missing Access

Solution

Authorize your bot to use application commands


DISALLOWED_INTENTS

Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted

Solution

Some Gateway Intents require approval if your bot is verified. If your bot is not verified, you can toggle those intents to access them. - Discord

Privileged Gateway Intents