---
title: Installation
description: How to install i18n-error-base and its requirements.
---

## Requirements [#requirements]

- A runtime that can handle ES modules, such as Node.js.
- `valibot@^1.0.0` is required as a peer dependency.

`message` follows `lang` from Valibot's `getGlobalConfig()`.

## Installation [#installation]

```package-install
npm i i18n-error-base
```

If Valibot is not installed yet, add it as well.

```package-install
npm i valibot
```

:::warning[Peer dependency warning]
`valibot` is not bundled. Without `valibot@^1.0.0`, the import fails to resolve.
:::

## Import [#import]

```ts
import { I18nErrorBase, setErrorMessage } from "i18n-error-base";
import type { ErrorMeta, ErrorOptions, I18nErrorBaseParams, MessageFactory } from "i18n-error-base";
```

## Next steps [#next-steps]

See [Usage](/i18n-error-base/en/usage) for definition and switching basics.
