Skip to content

Upgrade to Hyas v2

This guide will help you migrate from Hyas v1 to Hyas v2.

Prerequisites

  • Node.js - v20.11.0 or higher — run node -v to check.
  • Hugo extended - v0.125.0 or higher — run hugo version to check.
  • Text editor - We recommend VS Code — see also Editor Setup.
  • Terminal - Hyas 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.

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

Install the latest Hyas project dependencies inside your project:

Terminal window
npm install gethyas@latest

4. Install Prettier and Vite

Install the latest version of Prettier and Vite — as devDependencies:

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

5. Install integrations

Optionally, install the the recommended integrations in your project:

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

Configuration

Check your project’s configuration for Hyas and the recommended integrations:

Known Issues

ENOENT

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

Terminal window
npm run clean:install && npm install