# COPY failed: file not found in the build context

A `COPY` line in your Dockerfile names a file that is not in the build context. The root directory setting may point at the wrong folder, or the file is one `deploy` skips, such as `.env` or `node_modules`.

## The error

```
failed to compute cache key: "/package.json": not found
```

## Why it happens

A `COPY` line in your Dockerfile names a file that is not in the build context. The root directory setting may point at the wrong folder, or the file is one `deploy` skips, such as `.env` or `node_modules`.

## How to fix it

Check the root directory and make the `COPY` paths relative to it. Run `deploy` from the folder that holds those files.

```
ezhst build show
ezhst build set --root-dir apps/web
ezhst redeploy
```

## Still stuck

Read the [build log](/docs/cli/deployments-log) and [runtime logs](/docs/cli/logs), or browse [all errors](/errors).
