Articles on: Troubleshooting

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:


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: 06/13/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!