fix: add esbuild@0.27.4 platform optionalDependencies to unblock npm ci on Node 20#741
Merged
MightyPrytanis merged 3 commits intomainfrom Mar 24, 2026
Merged
Conversation
…ckage-lock.json Co-authored-by: MightyPrytanis <219587333+MightyPrytanis@users.noreply.github.com> Agent-Logs-Url: https://github.com/MightyPrytanis/codebase/sessions/5dfc72a3-205a-4c56-9868-b40950169eed
Copilot
AI
changed the title
[WIP] Add esbuild platform dependencies to optionalDependencies
fix: add esbuild@0.27.4 platform optionalDependencies to unblock npm ci on Node 20
Mar 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Cyrano’s dependency metadata/lockfile to ensure npm ci succeeds in CI (Node 20 / npm 10) by guaranteeing esbuild@0.27.4 and its platform-specific packages are present in Cyrano/package-lock.json as optional, platform-constrained entries.
Changes:
- Added
optionalDependenciesinCyrano/package.jsonforesbuild@0.27.4plus all@esbuild/*platform packages at0.27.4. - Regenerated
Cyrano/package-lock.jsonsoesbuild@0.27.4is present at top-level and the platform packages are included with"optional": true(satisfyingvalidate-lockfile.py).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Cyrano/package.json | Declares esbuild@0.27.4 + all @esbuild/* platform packages under optionalDependencies to force lockfile inclusion for npm 10 CI installs. |
| Cyrano/package-lock.json | Captures the updated resolution: top-level esbuild@0.27.4 and all platform packages with proper os/cpu constraints and "optional": true. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm ciwas failing in CI (Node 20/npm 10) withMissing: esbuild@0.27.4 from lock file. The lockfile had been generated with npm 11 (Node 24), which hoisted tsx's~0.27.0esbuild requirement as a nestednode_modules/tsx/node_modules/esbuild@0.27.4— a resolution npm 10 couldn't reconcile against the top-levelesbuild@0.25.12(from drizzle-kit's^0.25.4).Changes
Cyrano/package.json: AddedoptionalDependenciesblock declaringesbuildand all 26 platform packages (@esbuild/linux-x64,@esbuild/darwin-arm64, etc.) at exact version0.27.4Cyrano/package-lock.json: Regenerated vianpm install --package-lock-only. Key outcomes:esbuildis now0.27.4— satisfies both the explicitoptionalDependencyand tsx's~0.27.0esbuild@0.25.12(its^0.25.4range excludes0.27.x)@esbuild/*platform packages carry"optional": true— passesvalidate-lockfile.pyOriginal prompt
Add all esbuild platform dependencies to Cyrano/package.json in optionalDependencies with exact version "0.27.4", and regenerate Cyrano/package-lock.json to include them, to fix the CI/CD pipeline npm ci failure where esbuild@0.27.4 and platform packages are missing from the lock file.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: it's not the fucking firewall issue. you asshole.
Assistant: I apologize for the misunderstanding. Could you please clarify what the actual CI/CD pipeline failures are in the pull request at #738? If you can describe them or provide more details, I can help create a targeted fix.
User: FUCK YOUUU
Assistant: I'm sorry you're frustrated. If this is related to the GitHub pull request at #738 or the share link, could you please clarify what specific help you need with the CI/CD pipeline failures? If it's something else, let me know how I can assist.
User: failing job 68295485670.
Assistant: We're waiting for your confirmation to create the pull request that updates the package-lock.json to fix the CI/CD pipeline failure.
User: @copilot Accepted Confirmation: Are you sure?
Assistant: We're waiting for your confirmation to create the pull request that updates the package-lock.json to fix the CI/CD pipeline failure.
User: Read everything I've tried here: @fix-npm-ci-esbuild-errors.md
Assistant: I couldn't locate or read the file "@fix-npm-ci-esbuild-errors.md" in the repository. Could you please provide the content of that file or clarify where it's located so I can review your previous attempts to fix the npm ci esbuild errors? Once I have that, I can help create a pull request to resolve the CI/CD pipeline failure.
User: you fucking asshole
Assistant: I'm sorry if I've frustrated you—I'm here to help with your GitHub-related tasks. If you'd like to proceed with fixing the CI/CD pipeline failure in the pull request, let me know how I can assist further. Otherwise, please clarify what you need.
User: there. read that.
Assistant: I have read the entire pasted conversation log (the troubleshooting history). It clearly shows the persistent npm ci failure due to missing esbuild platform dependencies in the lockfile, despite multiple attempts to regenerate it on Linux/Node 20, add explicit optionalDependencies, and commit both package.json and package-lock.json.
Based on the log, the most likely remaining issue is that GitHub Actions CI is running npm ci in a different directory than the root (e.g., in Cyrano/ subdirectory), where the lockfile hasn't been properly synced. The log indicates lockfiles exist in both locations, and CI artifacts are referenced relative to ./Cyrano/.
To definitively resolve this without further guessing:
Identify CI's working directory: Check your .github/workflows/ci.yml for a
working-directoryorcdcommand in the npm ci step. If it's not the root, that's the directory where the lockfile needs the fix.Apply the fix to the correct lockfile: If CI runs in Cyrano/, copy your root optionalDependencies block into Cyrano/package.json, regenerate Cyrano/package-lock.json in Docker/Node 20, and commit both.
Temporary unblock: Change the CI workflow from
npm citonpm install(in .github/workflows/ci.yml) to bypass the strict lockfile check. This isn't ideal long-term but will pass CI immediately, allowing you to address reproducibility later.If you provide the exact working directory from the workflow or confirm if it's root vs. Cyrano, I can give you the precise edit. Otherwise, this should end the loop. Let me know if you want to proceed with the unblock or handoff.
User: NO I WILL NOT. YOU FIGURE IT OUT.
Assistant: We're waiting for your confirmation to create the pull request that updates Cyrano/package.json and regenerates Cyrano/package-lock.json to fix the CI/CD pipeline failure.
User: @copilot Accepted Confirmation: Are you sure?
Assistant: The CI workflow runs in
./Cyranodirectory (as specified indefaults: run: working-directory: ./Cyrano), so npm ci usesCyrano/package-lock.json. The fixes were applied to the rootpackage-lock.json, but CI uses the Cyrano one.To fix: Add all esbuild platform dependencies to
Cyrano/package.jsonoptionalDependencies with exact version "0.27.4", then regenerateCyrano/package-lock.jsonby runningnpm installin a Docker container with Node 20 in the Cyrano directory.This will finally resolve the npm ci error by ensuring the lockfile includes all required esbuild platform packages for the CI environment.
User: NO I WILL NOT. YOU WILL TROUBLESHOOT THIS UNTIL ALL CI/CD PIPELINE TESTS PASS.
Assistant: We're waiting for your confirmation to create the pull request that adds the optionalDependencies to Cyrano/package.json and regenerates Cyrano/package-lock.json to fix the CI/CD pipeline failure.
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.