Skip to content

Upgrade to Hyas v2

This guide will walk you through the steps to manually update from Hyas v1 to Hyas v2.

Upgrading

You can upgrade your project by following the steps below.

1. Clean dependencies

Clean dependencies currently installed to avoid conflicts.

Terminal window
npm run clean:install

2. Update package.json

Replace the contents of your project’s package.json with the following:

package.json
{
"name": "hyas-project",
"version": "0.0.0",
"description": "Hyas",
"author": "Hyas",
"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 Hyas, Prettier, and Vite

First, add an .npmrc file to your project root with the following:

.npmrc
enable-pre-post-scripts = true
auto-install-peers = true
node-linker = hoisted
prefer-symlinked-executables = false

Install Hyas

Next, install the latest version of Hyas:

Terminal window
npm install gethyas@latest

Install Prettier and Vite

Then, install the latest version of Prettier and Vite — as devDependencies:

Terminal window
npm install -D prettier@latest vite@latest

4. Install integrations

Optionally, install the the recommended integrations in your project:

Terminal window
npm install @hyas/images@latest @hyas/seo@latest

Configuration

Update your configuration files for the recommended integrations:

Know Issues

ENOENT

When you get an ENOENT error message, run the following command:

Terminal window
npm run clean:install && npm install