Fix Invalid Package Dependencies in Unity

Unity reports invalid or unresolved dependencies when Package Manager cannot calculate and load the package set requested by a project. The useful part of the error is normally the package name, source, file, or version shown in the Console—not the generic dependency warning.

Back up the project, capture the complete first Package Manager error, and repair that specific failure before changing any other packages.

Diagnose before editing

Preserve the current package files, then use the detailed error to select one repair.

  1. Close Unity and back up the project or commit its current files.
  2. Reopen it with the intended Unity version and copy the first package-resolution error.
  3. Match the error to the manifest, package source, version, network, or VPM checks below.
VRChat project note

Manage official and VPM-compatible packages from the project's Manage Project screen in Creator Companion. If the VRChat Package Resolver reports missing packages when Unity opens, review the list and use its resolve controls before manually changing package files.

Preserve the package state

Close Unity before making a recovery copy. For a Creator Companion project, use its Make Backup action or copy the complete project folder to a separate location.

At minimum, preserve these files before editing:

  • Packages/manifest.json
  • Packages/packages-lock.json
  • Packages/vpm-manifest.json in a VPM-compatible VRChat project

Also note the Unity version recorded by the project and the last package action that succeeded. A dependency repair should not include an unrelated Unity upgrade.

Read the complete error

Open Window > Package Manager and check its status bar and any error icon beside a package. Open Window > General > Console when Package Manager does not load or the message is truncated.

Capture the first error that starts with text such as:

  • Failed to resolve packages
  • The file ... manifest.json is not valid JSON
  • No 'git' executable was found
  • repository ... not found
  • Unable to add package
  • Package ... has invalid dependencies

Later compile errors can be consequences of packages that never loaded. Resolve the package failure first, then clear and reassess the Console.

Know which file owns the problem

File or system Purpose Recovery rule
Packages/manifest.json Lists the project's direct Unity Package Manager dependencies and registry configuration Edit only the entry identified by the error, or restore the file from a known working copy
Packages/packages-lock.json Stores Unity's successful dependency resolution for deterministic results Treat it as generated state; do not hand-edit dependency versions in it
Packages/vpm-manifest.json Records the VPM packages required by a compatible VRChat project Use Creator Companion or the VRChat Package Resolver to restore those packages
Creator Companion repositories Supply official, curated, community, or user VPM packages Confirm the required repository is enabled and available

Unity recalculates package resolution when the project manifest or a mutable package manifest changes. Make the intended correction in the owning manifest instead of trying to force a result by editing the lock file.

Match the error to a repair

Error detail Likely failure Repair
manifest.json is not valid JSON Missing comma, extra comma, mismatched brace, or invalid quote Use the reported line and column to correct the JSON, or restore the manifest
No 'git' executable was found A Git-based dependency is present but Git is unavailable Install Git, then restart Unity
git-lfs: command not found The Git package requires Git LFS Install Git LFS and verify that it runs before reopening Unity
repository ... not found The Git URL, revision, access, or repository is wrong Copy the correct clone URL, verify access, and check the revision after #
A file: dependency cannot be found The local package folder or tarball moved or is unavailable Restore the path or intentionally replace/remove that direct dependency
Registry or refresh error Unity cannot reach the registry Check network, proxy, firewall, certificate, and registry configuration
One package shows a dependency error Its requested dependency version cannot be resolved Open its Package Manager details and restore a compatible package version
VRChat Package Resolver lists missing packages Files do not match the VPM manifest Review the list and resolve the required VPM packages

Do not remove a package just because it appears in the first error. Another installed package may depend on it.

Repair malformed manifest.json

Unity's error includes the point where JSON parsing failed. Open Packages/manifest.json in a text editor and inspect that location.

A valid dependencies object follows this structure:

{
  "dependencies": {
    "com.example.first-package": "1.0.0",
    "com.example.second-package": "2.0.0"
  }
}

Check for:

  • straight double quotes around every name and value
  • one comma between entries, but no comma after the last entry
  • matched {} braces and [] brackets
  • a package name on the left and its version, Git URL, or file: source on the right
  • registry entries that remain complete if the package came from a scoped registry

Save the corrected file. Unity should attempt package resolution again. If the intended entry is uncertain, restore the manifest rather than guessing a version.

Repair a Git dependency

The dependency value in manifest.json can be a Git URL. Use the Console wording to separate the common failures:

  1. If Git is not found, install Git and restart Unity.
  2. If Git LFS is not found, install Git LFS when the repository requires it.
  3. If the repository is not found, verify the clone URL and your access.
  4. If the URL targets a revision, confirm the branch, tag, or commit after # still exists.
  5. If authentication is required, follow the repository owner's supported access method.

Do not replace a private or unavailable dependency with an unrelated public package that happens to have a similar name.

Repair a local package path

A local dependency uses a file: value that points to a folder or tarball. Check whether:

  • the path still exists
  • a relative path is correct from the project
  • the package folder still contains its own package.json
  • a removable drive or synced folder is currently available

Restore the expected location or update the direct dependency to the package's new verified location. If the project no longer needs the package, confirm what uses it before removing the manifest entry.

Repair registry or network access

A status-bar refresh error can affect every registry package rather than one dependency. Check:

  1. whether the device can reach the required registry
  2. whether a proxy or firewall is intercepting Unity
  3. whether a managed network uses a certificate Unity does not recognise
  4. whether the project's scopedRegistries entry still has the correct URL and scopes
  5. whether the package is from a registry that is still enabled

Do not rewrite dependency versions while the package source itself is unreachable.

Restore VRChat packages

Creator Companion's package manager and the VRChat Package Resolver manage VPM-compatible packages.

From Creator Companion

  1. Open Projects.
  2. Find the affected project and select Manage Project.
  3. Review packages with an installed version and any available version change.
  4. Restore or update only the package involved in the failure.
  5. Reopen the project and allow Unity to finish importing.

From the VRChat Package Resolver

When the resolver reports that packages are missing or do not match Packages/vpm-manifest.json:

  1. Select Show Me What's Missing if you want to review the differences.
  2. Use Resolve for a specific package or Resolve All for the versions recorded in the VPM manifest.
  3. Let resolution finish before checking Unity's remaining errors.

Do not remove the resolver package from a VPM-compatible project; VRChat documents it as part of the project's package-restoration system.

Handle version conflicts

Unity's project manifest lists direct dependencies. Packages can also request indirect dependencies, and Package Manager computes a compatible graph.

When the error names incompatible versions:

  1. Identify which direct package requests each version.
  2. Check the package's documentation for versions compatible with the project's Unity version.
  3. Restore the most recent known-working direct package version.
  4. Avoid adding an indirect dependency directly to manifest.json just to override the resolver unless the package documentation explicitly requires it.
  5. Reopen Package Manager and verify that the dependency error has cleared.

For VRChat SDK packages, select supported versions through Creator Companion rather than pasting guessed version numbers into Unity's manifest.

Verify the repair

A resolved project should meet all of these checks:

  • Package Manager opens without a resolution error.
  • Its status bar finishes refreshing.
  • The affected package no longer shows an error icon.
  • The Console no longer reports Failed to resolve packages.
  • VRChat SDK panels load in a VRChat project.
  • Existing scenes and prefabs retain their scripts and components.

Compile errors that remain after package resolution are separate issues. Work from the first remaining Console error.

Last resort: reset a clone

Unity provides Help > Reset Packages to defaults, but the operation resets all project packages and cannot be undone from Unity. It can remove package requirements the project actually needs.

Use it only as a diagnostic on a backed-up clone:

  1. Close Unity and copy the complete project folder.
  2. Give the copy a distinct name.
  3. Open the copy with the same Unity version.
  4. Select Help > Reset Packages to defaults.
  5. If the clone opens, reinstall the required packages one at a time to identify the failing dependency.

Do not use the reset as the first repair on the working VRChat project.

Unity reports a JSON error one line after my edit.

The parser can only report where the structure became impossible to read. Inspect the preceding entry for a missing comma, extra comma, invalid quote, or unmatched brace.

Package Manager does not open.

Check the Console for a malformed manifest.json error. If the window is merely off-screen, Unity also recommends resetting the editor layout from Window > Layouts > Default.

The error started after moving the project.

Inspect direct dependencies that begin with file:. An absolute path or a relative path outside the project may no longer point to the local package.

Creator Companion and Unity show different package problems.

Use Creator Companion or the VRChat Package Resolver for VPM packages, then use Unity Package Manager for the remaining UPM error. Keep the VPM manifest and Unity manifest responsibilities separate.

Can I delete `packages-lock.json`?

Do not make that the first repair. The lock file records a successful deterministic resolution. Correct or restore the owning manifest first, and preserve the lock file with the project so you can compare the package state.

Package resolution works in a new project only.

That narrows the failure to the affected project's manifests, package sources, or requested versions. Compare against the correct project template, but do not copy an unrelated manifest over the project.

Continue learning

Official references