diff --git a/.github/workflows/cannon.yml b/.github/workflows/cannon.yml index 7161dd1e29176..29d761248a0ee 100644 --- a/.github/workflows/cannon.yml +++ b/.github/workflows/cannon.yml @@ -29,7 +29,7 @@ jobs: with: node-version: "18" - # Setup npm cache separately + # Setup npm cache - name: Cache npm dependencies uses: actions/cache@v4 with: @@ -44,7 +44,12 @@ jobs: - name: Install npm dependencies working-directory: packages/contracts-bedrock run: | - npm ci + # First install to ensure package-lock.json exists + npm install + # Then run npm ci for consistent installs + if [ -f "package-lock.json" ]; then + npm ci + fi - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1