# specifier_invalid

> An import specifier is neither an exact relative path nor a disko: built-in name.

An import specifier is neither an exact relative path nor a disko: built-in name.

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

An import specifier has a form disko does not accept. A specifier is either a
relative path that names the exact file, extension included, or a `disko:`
built-in such as `disko:math`. Nothing is resolved for you.

## Why it happens

- A bare package name (`lodash`), an absolute path (`/src/x.js`), a URL or a
  `node:` module. There is no `node_modules` resolution.
- A missing extension (`./util`) or a directory (`./levels/`); there is no
  `index` lookup.
- `..` after a normal segment (`./a/../b.js`), doubled `/`, backslashes, a
  query or fragment (`?x`, `#x`), or `%` escapes.
- A `disko:` name that is not lowercase letters, digits and `-`.

## Wrong

```ts title="src/main.ts"
import { clamp } from "lodash";
import { rules } from "./rules";
```

## Right

```ts title="src/main.ts"
import { clamp } from "disko:math";
import { rules } from "./rules.ts";
```

## See also

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