Upgrade to Thulite v2
This guide will help you migrate from Thulite v1 to Thulite v2.
Prerequisites
- Node.js -
v20.11.0
or higher — runnode -v
to check. - Hugo extended -
v0.125.0
or higher — runhugo version
to check. - Text editor - We recommend VS Code — see also Editor Setup.
- Terminal - Thulite is accessed through its command-line interface (CLI).
Upgrading
You can upgrade your project by following the steps below.
1. Clean dependencies
Clean dependencies currently installed to avoid conflicts.
npm run clean:install
pnpm run clean:install
yarn run clean:install
2. Update package.json
Replace the contents of your project’s package.json
with the following:
{ "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" }}
3. Install Thulite
Install the latest Thulite project dependencies inside your project:
npm install thulite@latest
pnpm install thulite@latest
yarn add thulite@latest
4. Install Prettier and Vite
Install the latest version of Prettier and Vite — as devDependencies
:
npm install -D prettier@latest vite@latest
pnpm install -D prettier@latest vite@latest
yarn add -D prettier@latest vite@latest
5. Install integrations
Optionally, install the the recommended integrations in your project:
npm install @thulite/images@latest @thulite/seo@latest
pnpm install @thulite/images@latest @thulite/seo@latest
yarn add @thulite/images@latest @thulite/seo@latest
Configuration
Check your project’s configuration for Thulite and the recommended integrations:
Known Issues
ENOENT
When you get an ENOENT
error message, run the following command:
npm run clean:install && npm install
pnpm run clean:install && pnpm install
yarn run clean:install && yarn install