# import_unresolved

> A relative import names a file that does not exist with exactly that path.

A relative import names a file that does not exist with exactly that path.

| | |
| --- | --- |
| Kind | Build or validation problem |
| Reported by | Archive and source validation |
| `disko` exit code | 1 (problems) |

A relative import in the archive names a file that the archive does not
contain at exactly that path: the same directories, file name, case and
extension. Nothing is resolved for you: there is no extension guessing and no
`index` file lookup.

## Why it happens

Archive validation reports this code: the registry on upload, and room hosts
before loading. `disko publish` builds archives that pass it, because its
source walk stops earlier with [`source_file_missing`](/errors/source_file_missing)
or [`source_case_mismatch`](/errors/source_case_mismatch). You usually see this
code for an archive built or edited by another tool, for example one whose
file was renamed after packaging.

## Wrong

```js title="src/main.js"
// The archive contains src/rules.js.
import { scoreGoal } from "./Rules.js";
```

## Right

```js title="src/main.js"
import { scoreGoal } from "./rules.js";
```

Build archives with `disko publish --dry-run --out <file>` rather than by hand.

## See also

- [Project structure & imports](/games/project-structure)
- [`specifier_invalid`](/errors/specifier_invalid)
