diff --git a/docs/guides/launch.md b/docs/guides/launch.md index 35588debd3ae..10c0b10f5d84 100644 --- a/docs/guides/launch.md +++ b/docs/guides/launch.md @@ -320,3 +320,24 @@ to: ``` "@matterlabs/hardhat-zksync-solc": "^0.3.15", ``` + +### Error: Cannot read properties of undefined (reading 'compilerPath') + +**Problem**. `zk init` fails with an error similar to the following: + +```text +Yarn project directory: /Users//Projects/zksync-era/contracts/system-contracts +Error: Cannot read properties of undefined (reading 'compilerPath') +error Command failed with exit code 1. +``` + +**Description**. The compiler downloader +[could not verify](https://github.com/NomicFoundation/hardhat/blob/0d850d021f3ab33b59b1ea2ae70d1e659e579e40/packages/hardhat-core/src/internal/solidity/compiler/downloader.ts#L336-L383) +that the Solidity compiler it downloaded actually works. + +**Solution**. Delete the cached `*.does.not.work` file to run the check again: + +```sh +# NOTE: Compiler version, commit hash may differ. +rm $HOME/Library/Caches/hardhat-nodejs/compilers-v2/macosx-amd64/solc-macosx-amd64-v0.8.20+commit.a1b79de6.does.not.work +```