Skip to content

Upgrade to Hyas v2

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


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:

"name": "hyas",
"version": "0.0.0",
"author": "Hyas",
"license": "MIT",
"scripts": {
"dev": "exec-bin node_modules/.bin/hugo/hugo server --bind= --disableFastRender --baseURL=http://localhost --noHTTPCache",
"dev:drafts": "exec-bin node_modules/.bin/hugo/hugo server --bind= --disableFastRender --baseURL=http://localhost --noHTTPCache --buildDrafts",
"create": "exec-bin node_modules/.bin/hugo/hugo new",
"lint": "npm run lint:scripts && npm run lint:styles && npm run lint:markdown",
"lint:scripts": "eslint --cache config",
"lint:styles": "stylelint --cache \"assets/scss/**/*.{css,sass,scss}\"",
"lint:markdown": "markdownlint-cli2 \"*.md\" \"content/**/*.md\"",
"test": "echo \"Error: no test specified\" && exit 1",
"build": "exec-bin node_modules/.bin/hugo/hugo --minify",
"preview": "http-server --gzip --brotli --ext=html --cors",
"clean": "npm run clean:build && npm run clean:lint && npm run clean:install",
"clean:build": "shx rm -rf public resources .hugo_build.lock",
"clean:install": "shx rm -rf node_modules package-lock.json yarn.lock pnpm-lock.yaml",
"clean:lint": "shx rm -rf .eslintcache .stylelintcache",
"preinfo": "npm version",
"info": "npm list",
"postinfo": "exec-bin node_modules/.bin/hugo/hugo version",
"postinstall": "shx rm -rf node_modules/.bin/hugo && shx mkdir node_modules/.bin/hugo && shx cp node_modules/gethyas/node_modules/.bin/hugo/* node_modules/.bin/hugo"
"engines": {
"node": ">=16.12.0"

3. Install Hyas and integrations

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

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 integrations

Optionally, install the the recommended integrations in your project:

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


Update your configuration files for the recommended integrations:

Know Issues


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

Terminal window
npm run clean:install && npm install