fix: resolve uWebSockets.js via https, not ssh, in package-lock.json#561
Merged
Conversation
The optional dependency (#1096) was locked to a git+ssh:// URL, which requires a private key against github.com. Our Docker build stage has no SSH credentials, so npm silently skips it as a failed optional dependency — the resulting image never bundles the native addon, and HARPER_UWS_UDS / HARPER_UWS_HTTP are inert even when set. git+https needs no credentials for a public repo. Verified npm ci installs uWebSockets.js's native binaries successfully in a credential-less, HOME-stripped environment matching the Docker build stage (previously failed silently there).
Contributor
|
Reviewed; no blockers found. |
cb1kenobi
reviewed
Jul 10, 2026
The previous fix (hand-editing package-lock.json's resolved field to git+https) only patched the lockfile snapshot. package.json still declared the dependency via the github: shorthand (github:uNetworking/uWebSockets.js#v20.68.0), and npm/hosted-git-info canonicalizes ANY github.com git dependency back to git+ssh:// when regenerating — confirmed this happens even with an explicit git+https:// spec in package.json, with a clean npm cache. A future plain `npm install` would have silently reverted the lockfile fix and reintroduced the silent-skip-in-Docker bug. Switch to a plain tarball URL (https://.../archive/<sha>.tar.gz) instead. npm treats this as a remote-tarball dependency, not a hosted-git one, so hosted-git-info's ssh canonicalization never applies — resolved stays a plain https URL with a pinned integrity hash, immune to regeneration regressing it. Verified npm ci installs all 15 native .node binaries in a HOME-stripped, credential-less environment (matching the Docker build stage) both before and after a full npm install regenerates the lockfile from package.json.
2 tasks
This was referenced Jul 11, 2026
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.
Summary
uWebSockets.js(added in #1096 as an optional dependency forHARPER_UWS_UDS/HARPER_UWS_HTTP) is locked inpackage-lock.jsonto agit+ssh://URL.Dockerfile,buildtarget) has no SSH credentials forgithub.com.npm citreats the failed clone as an optional-dependency failure and silently skips it — no error, no warning, build succeeds without it.uWebSockets.jsaddon, soHARPER_UWS_UDS/HARPER_UWS_HTTPare inert even when explicitly set — confirmed on a live5.2.0-alpha.2dev cluster (gitbinary is present viabuildpack-deps:bookworm, but no SSH key exists to satisfy the locked URL).Fix
One-line change:
resolvedforuWebSockets.jsinpackage-lock.jsonfromgit+ssh://togit+https://(same commit, same tagv20.68.0). Public-repo HTTPS clone needs no credentials.Verification
Ran
npm ciin a HOME-stripped, credential-less environment (no~/.ssh, no SSH agent) matching the Docker build stage:uWebSockets.jssilently absent fromnode_modules(0 native.nodebinaries).Test plan
node_modules/uWebSockets.js/*.nodeHARPER_UWS_UDSon a dev cluster behind symphony and confirm the uWS backend actually engages (next step from #1096's rollout plan)