> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.squarecloud.app/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# INVALID_DEPENDENCY on deploy: how to fix

## What this error means

During deploy, Square Cloud couldn't find your dependency file in the **root** of the application, so it doesn't know which packages to install.

## Why it happens

* The dependency file simply **isn't in the root** of the project.
* The file has an **extra extension** (e.g., `package.json.txt` instead of `package.json`) — often added automatically by Windows or by a text editor.

## How to fix it

**Node.js** — make sure a `package.json` exists in the root:

* If it doesn't exist, create one with `npm init -y`.
* Confirm the name is exactly `package.json`, with no extra extension.

**Python** — make sure a `requirements.txt` exists in the root, with the correct name and the dependencies listed:

```txt
discord.py
```

**Check the extension.** Turn on "show file name extensions" in your operating system and confirm the file is `.json` (Node) or `.txt` (Python) — not something like `package.json.txt`.

After fixing it, re-deploy the application.

## Related

If the file is found but a specific package is missing, see [MODULE_NOT_FOUND / Cannot find module: how to fix it](https://help.squarecloud.app/en-us/article/modulenotfound-cannot-find-module-how-to-fix-it-2ikj6i/). If the app still won't start, review [My application won't start: Verifying the start script](https://help.squarecloud.app/en-us/article/my-application-wont-start-verifying-the-start-script-147pgxu/).
