gothands / contracts

0 stars 1 forks source link

Fix `yarn install` with Node 18 #1

Closed juztamau5 closed 1 year ago

juztamau5 commented 1 year ago

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:

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:

$ yarn install

yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.19s.