Error: "Failed to initiate deployment. Unexpected end of JSON input."

Description

When I run a CI job, it fails, and the error message 'Failed to initiate deployment. Unexpected end of JSON input' appears.

Cause

If any of the folders in the remote repository has an empty JSON file, that will cause SFDX commands to fail with an incorrect JSON error.

Steps for resolution

Delete the empty JSON file(s) from the remote repository to resolve this issue and rerun the CI job.

Last updated