# V2This guide will help you migrate from Thulite v1 to Thulite v2.
Use this guide to migrate your project from Thulite v1 to Thulite v2.

## Prerequisites

- [Hugo](https://github.com/gohugoio/hugo/releases/latest) (latest extended or extended/deploy edition)
- [Thulite](https://github.com/thuliteio/thulite/releases/latest) (latest version)
- [Node.js/npm](https://nodejs.org/en/download) (latest LTS version)

## Updating

Follow the steps below to update your project.

{{< steps >}}
{{< step >}}

Remove currently installed dependencies to avoid version conflicts:

{{< tabs "package-manager-1" >}}
  {{< tab "npm" >}}

```bash
npm run clean:install
```

  {{< /tab >}}
  {{< tab "pnpm" >}}

```bash
pnpm run clean:install
```

  {{< /tab >}}
  {{< tab "Yarn" >}}

```bash
yarn run clean:install
```

  {{< /tab >}}
  {{< tab "bun" >}}

```bash
bun run clean:install
```

  {{< /tab >}}
{{< /tabs >}}

{{< /step >}}
{{< step >}}
Update `package.json`

Replace the contents of your project's `package.json` with the following template:

```json
// package.json
{
  "name": "thulite-project",
  "version": "0.0.0",
  "description": "Thulite",
  "author": "Thulite",
  "license": "MIT",
  "scripts": {
    "create": "hugo new",
    "dev": "hugo server --disableFastRender --noHTTPCache",
    "format": "prettier **/** -w -c",
    "build": "hugo --minify --gc",
    "preview": "vite preview --outDir public"
  },
  "engines": {
    "node": ">=20.11.0"
  }
}
```

{{< /step >}}
{{< step >}}

Install the latest Thulite dependency in your project:

{{< tabs "package-manager-1" >}}
  {{< tab "npm" >}}

```bash
npm install thulite@latest
```

  {{< /tab >}}
  {{< tab "pnpm" >}}

```bash
pnpm install thulite@latest
```

  {{< /tab >}}
  {{< tab "Yarn" >}}

```bash
yarn add thulite@latest
```

  {{< /tab >}}
  {{< tab "bun" >}}

```bash
bun install thulite@latest
```

  {{< /tab >}}
{{< /tabs >}}

{{< /step >}}
{{< step >}}

Install the latest versions of Prettier and Vite as `devDependencies`:

{{< tabs "package-manager-1" >}}
  {{< tab "npm" >}}

```bash
npm install -D prettier@latest vite@latest
```

  {{< /tab >}}
  {{< tab "pnpm" >}}

```bash
pnpm install -D prettier@latest vite@latest
```

  {{< /tab >}}
  {{< tab "Yarn" >}}

```bash
yarn add -D prettier@latest vite@latest
```

  {{< /tab >}}
  {{< tab "bun" >}}

```bash
bun add -D prettier@latest vite@latest
```

  {{< /tab >}}
{{< /tabs >}}

{{< /step >}}
{{< step >}}

Optionally, install the recommended integrations in your project:

{{< tabs "package-manager-1" >}}
  {{< tab "npm" >}}

```bash
npm install @thulite/images@latest @thulite/seo@latest
```

  {{< /tab >}}
  {{< tab "pnpm" >}}

```bash
pnpm install @thulite/images@latest @thulite/seo@latest
```

  {{< /tab >}}
  {{< tab "Yarn" >}}

```bash
yarn add @thulite/images@latest @thulite/seo@latest
```

  {{< /tab >}}
  {{< tab "bun" >}}

```bash
bun install @thulite/images@latest @thulite/seo@latest
```

  {{< /tab >}}
{{< /tabs >}}

{{< /step >}}
{{< /steps >}}

{{< callout context="note" title="Need to continue?" icon="info-circle" >}}

After upgrading Thulite to the latest version, you may not need to make any changes to your project at all!

If you notice errors or unexpected behavior, review the sections below to identify project changes you may still need to make.

{{< /callout >}}

## Configuration

Review your project configuration for Thulite and the recommended integrations:

- [Thulite](/start-here/configuration/)
- [Images](https://images.thulite.io/docs/start-here/configuration/)
- [SEO](https://seo.thulite.io/docs/start-here/configuration/)
- [SVG](https://svg.thulite.io/docs/start-here/configuration/)

## Known Issues

### ENOENT

If you get an `ENOENT` error, run the following command:

{{< tabs "package-manager-1" >}}
  {{< tab "npm" >}}

```bash
npm run clean:install && npm install
```

  {{< /tab >}}
  {{< tab "pnpm" >}}

```bash
pnpm run clean:install && pnpm install
```

  {{< /tab >}}
  {{< tab "Yarn" >}}

```bash
yarn run clean:install && yarn install
```

  {{< /tab >}}
  {{< tab "bun" >}}

```bash
bun run clean:install && bun install
```

  {{< /tab >}}
{{< /tabs >}}
