---
title: "Exiting with code -2"
description: "What exit code -2 from the Deployment Tool means and how to fix it."
product: "Alchemy"
edition: "Public"
type: "reference"
url: "https://docs.cloudhouse.com/public/troubleshooting-packages/errors/exit-codes/exit-code-2/exiting-with-code-2/"
---
# Exiting with code -2

**Problem**: When deploying a Compatibility Package, the following error is displayed:

Applies to: `Alchemy`

```
ERROR Cloudhouse.Container.Deployment.Program - Failed:
```

```
Cloudhouse.Container.Core.Exceptions.ConfigurationFileNotFoundException: Package metadata file <path>\chmetadata.json is not found in package directory.
```

```
   at Cloudhouse.Container.Core.PackageMetadataFile.Parse(String path)
```

```
   at Cloudhouse.Container.Core.PackageDirectory..ctor(String path)
```

```
   at Cloudhouse.Container.Deployment.DeploymentCommandFactory.Deploy()
```

```
   at Cloudhouse.Container.Deployment.Program.Main(String[] args)
```

```
ERROR Cloudhouse.Container.Deployment.Program - Exiting with code: -2
```

![Package metadata file lt path 1](https://docs.cloudhouse.com/public/assets/images/helpjuice-import/package-metadata-file-not-found-in-package-directory-error-2-2022-10-12/package-metadata-file-lt-path-1.webp)

**Cause**: This error is caused if the `Cloudhouse.Container.Deployment.exe` is unable to find the `chmetadata.json` which should be in the root folder of the Compatibility Package you are trying to deploy.

**Solution**: To fix this issue, make sure the `chmetadata.json` file is present in the root folder of the Cloudhouse Alchemy Compatibility Package. For example, the root folder of the Compatibility Package in the example below is location `1`, not `2` which is where the command was run from.

![Graphic showing correct and incorrect folder locations](https://docs.cloudhouse.com/public/assets/images/helpjuice-import/package-metadata-file-not-found-in-package-directory-error-2-2022-10-12/package-metadata-file-lt-path.webp)

!!! tip

    The Compatibility Package folder (which is where you should be running `Cloudhouse.Container.Deployment.exe` from), is the one that contains the Cloudhouse executables and the `chmetadata.json` file.

Once you have located the Compatibility Package's root folder, change to it and retry the deployment. If the `chmetadata.json` is missing, restore the Compatibility Package from backup or recreate the Compatibility Package.

If you still encounter problems, please contact your Cloudhouse Partner in the first instance (if relevant), otherwise contact Cloudhouse Support for further assistance.
