Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add comment explaining the need for separating postinstall from install
There are two reasons why we need to run `yarn install --frozen-lockfile` with the `--ignore-scripts` flag and run `yarn run postinstall` afterwards: 1. Sometimes during installation of the `monitoring` project we were getting random failures related to the presence of the `prepare-dependencies.sh` script from `threshold-network/solidity-contracts` in the project subdependencies. Lately we managed to remove the script from the `development`-tagged packages, but the script is still present in `goerli` and `mainnet` packages. As `monitoring` project installs `goerli` and `mainnet` `@keep-network/tbtc-v2` packages during `yarn install`, the random failures may still occur. As a workaround for this problem we will ca run install step with the `--ignore-scripts` flag which installs the dependencies without running the postinstall scripts (neither in subdependencies nor in the main project). We then add a step that executes `yarn run postinstall` - this way we still execute any postinstall scripts from the main project (currently it's `npm rebuild bcrypto`) script. 2. The `bcoin` holds their `node_modules` in VCS (https://github.com/bcoin-org/bcoin/tree/master/node_modules). That means `bcrypto` dependency is already here when we run `yarn install`. For an unknown reason, `yarn install` does not build all native components in that case, hence the need for manual `postinstall` that does it again under the hood.
- Loading branch information