INVALID_DEPENDENCY error means Virtus Cloud could not locate or parse your application’s dependency file during the deployment build step. Without a valid dependency manifest, the platform has no way to know which packages to install — so the build fails before your application ever starts. This error is almost always caused by a missing file or a subtle naming mistake, both of which are quick to fix once you know what to look for.
When Does It Occur?
The error appears in your deployment logs before your application process starts, during the dependency installation phase. It typically looks like:Why Does It Occur?
The most common causes are:- The dependency file (
package.jsonorrequirements.txt) doesn’t exist in the root directory of your project — it may be inside a subdirectory. - The file was inadvertently saved with a double extension, such as
package.json.txtorrequirements.txt.txt. This often happens when creating the file in a text editor on Windows with hidden file extensions. - The file exists but contains a syntax error that prevents it from being parsed.
- You uploaded your project without including the dependency file at all.
How to Fix It
- Node.js (package.json)
- Python (requirements.txt)
Navigate to your project's root directory
Make sure you’re working in the top-level folder of your application — the same directory that contains your main JavaScript file.
Check whether package.json exists
Confirm that a This generates a default
package.json file is present in the root. If it’s missing, create one with the following command:package.json with your project’s name, version, and an empty dependencies section.Verify the filename
Ensure the file is named exactly
package.json — lowercase, with no extra extensions. On Windows, enable “Show file extensions” in File Explorer to confirm the full filename is not package.json.txt.Validate the JSON syntax
Open
package.json in a text editor and confirm it is valid JSON. A common mistake is a trailing comma after the last item in an object or array. You can paste the file contents into jsonlint.com to check for syntax errors.package.json
Additional Tips
Double-check file extensions
Double-check file extensions
File extension mistakes are the single most common cause of this error. Always verify the full filename — including the extension — before uploading. Most operating systems hide extensions by default, which can lead to inadvertently creating
requirements.txt.txt.Make sure the file is at the project root
Make sure the file is at the project root
Virtus Cloud looks for the dependency file in the root of your uploaded project. If your
package.json is inside a src/ or backend/ subdirectory, the platform won’t find it. Move it to the top level.If you continue to experience
INVALID_DEPENDENCY errors after verifying your dependency file, contact the Virtus Cloud support team.