# Errors

### Disallowed Intents

This error happens when you don't enable required Gateway Intents on [Discord Developer Portal](https://discord.com/developers/applications).

**How to fix:** Visit [Bot Application Setup](/ultrabot/installation-and-setup/app-setup.md) Page, and follow steps **2** & **3**.

{% code overflow="wrap" %}

```yaml
Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted.
```

{% endcode %}

### node:events

This error happens when you're using unsupported NodeJS Version (Older than 16.9).

**How to fix:** Visit [Dependencies](/ultrabot/installation-and-setup/requirements.md) Page, and follow step 1 (1.2) - Only if you're hosting it on Linux Server, if you've purchased Server from Hosting, then you have to contact them on how to change NodeJS Version.

{% code overflow="wrap" %}

```yaml
Error: Cannot find module 'node:events'
```

{% endcode %}

### The module was compiled against.. <a href="#module-compile-error" id="module-compile-error"></a>

This error happens when you're use one NodeJS Version to install node\_modules and then start bot with some other.

**How to fix:** Delete `node_modules` folder and use the correct version to reinstall modules.

{% code overflow="wrap" %}

```yaml
Error: The module '...'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires
NODE_MODULE_VERSION 102. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
```

{% endcode %}

### Error: Cannot find module '...' <a href="#module-not-found" id="module-not-found"></a>

This error happens when you don't have module(s) installed.

**How to fix:** If you're hosting bot on Linux machine you can follow [Linux Installation Setup](/ultrabot/installation-and-setup/linux-installation.md) Guide, if you're hosting on Pterodactyl or other panel, you'll probably just have to Start Bot.

{% code overflow="wrap" %}

```yaml
Error: Cannot find module '...'
...
code: 'MODULE_NOT_FOUND'
```

{% endcode %}

### Supplied roles is not a Role.

This error happens when you put invalid Role ID/Name into Config Field.

**How to fix:** Try to find the most recent changes you did to some config field which has to do with Role(s) ID/Name.

{% code overflow="wrap" %}

```yaml
TypeError [InvalidType]: Supplied roles is not a Role, Snowflake or Array or Collection of Roles or Snowflakes.
```

{% endcode %}

### Invalid OAuth2 redirect\_uri <a href="#oauth2-redirect-error" id="oauth2-redirect-error"></a>

This error happens when you didn't [setup Redirect URL on Discord Developer Portal](/ultrabot/other/dashboard-setup.md) properly (or didn't at all) or you didn't specify the it right in config.yml.

**How to fix:** Make sure that you followed the right format for URL. URL must start with `https://` or `http://` (depending on your hosting & setup), after that should be your domain/IP & at the end there should be `:PORT` (`PORT` being `port` config.yml field). When adding URL Redirect on Discord Developer Portal you also have to add `/callback` to the end of URL, while URL in config should be without it at the end.

config.yml URL field Examples

{% code overflow="wrap" %}

```yaml
https://yourdomain.com:3003
http://123.45.675.104:3003
https://yourdomain.com (when you setup domain yourself so domain is automatically included)
```

{% endcode %}

Discord Developer Portal URL Redirect Examples

{% code overflow="wrap" %}

```
https://yourdomain.com:3003/callback
http://123.45.675.104:3003/callback
https://yourdomain.com/callback (when you setup domain yourself so domain is automatically included)
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nidzo-docs.gitbook.io/ultrabot/other/errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
