An older version of hardhat made its way into the lock file, preventing yarn install from working if Node 18 is present. Regenerating the lockfile fixes this.
Procedure:
rm yarn.lock
yarn install
git add yarn.lock
How has this been tested?
Before:
$ yarn install
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
error hardhat@2.9.3: The engine "node" is incompatible with this module. Expected version "^12.0.0 || ^14.0.0 || ^16.0.0". Got "18.14.2"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Updating the lockfile via rm yarn.lock and yarn install re-generates a lockfile that allows hardhat to install:
Description
An older version of hardhat made its way into the lock file, preventing
yarn install
from working if Node 18 is present. Regenerating the lockfile fixes this.Procedure:
How has this been tested?
Before:
Updating the lockfile via
rm yarn.lock
andyarn install
re-generates a lockfile that allows hardhat to install: