Articles on: Troubleshooting
This article is also available in:

INVALID_DEPENDENCY on deploy: how to fix

What this error means


INVALID_DEPENDENCY means the dependency file is missing or empty at the root of the zip, so Square Cloud doesn't know which packages to install. The most common cause is zipping the folder instead of its contents: open the zip and check that the dependency file appears directly at the root.


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 — requirements.txt or pyproject.toml at the root, with the dependencies listed. Other runtimes: go.mod/go⁠.work (Go), Cargo.toml (Rust), Gemfile (Ruby), mix.exs (Elixir). Java, .NET, PHP and static sites don't need a dependency file.


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.



If the file is found but a specific package is missing, see MODULE_NOT_FOUND / Cannot find module: how to fix it. If the app still won't start, review My application won't start: Verifying the start script.

Updated on: 10/04/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!