hardhat-starter-kit
hardhat-starter-kit copied to clipboard
fix corrupted lockfile due to the NPM bug #4828.
Hi all! I tried using the newest version to learn how to use VRF 2.5. So i checked out and installed a fresh version with:
git clone https://github.com/smartcontractkit/hardhat-starter-kit.git
cd hardhat-starter-kit
npm install
npx hardhat test
results in
Error HH18: You installed Hardhat with a corrupted lockfile due to the NPM bug #4828.
Please delete your node_modules, package-lock.json, reinstall your project, and try again.
For more info go to https://hardhat.org/HH18 or run Hardhat with --show-stack-traces
After some research it seems to me the package-lock.json should be generated by the npm install command, and not necessarily be part of the git source. Removing the package-lock.json and adding it to the .gitignore fixes the issue.