Repository navigation
Conversation
Setup installed `nodejs-lts-jod` through `pacman -S --noconfirm`. On any
machine that already has the `nodejs` package, that is an unresolvable
conflict: the two packages conflict, and `--noconfirm` cannot answer the
replacement prompt. Setup aborts with
:: nodejs-lts-jod-22.23.2-1 and nodejs-26.8.1-2 are in conflict
`nodejs` is a dependency of common packages, so this is reachable without
the user having chosen a Node.js version at all. It also recurs whenever
Arch's `nodejs` moves past the supported range, and asking a user to swap
their system Node.js to install a camera plugin is a large ask.
Resolve the runtime instead of dictating it:
- Drop `nodejs-lts-jod` and `npm` from the pacman package list.
- Reuse the system runtime whenever it is Node.js 20, 22, or 24.
- Otherwise install the pinned Node.js 22.23.2 LTS build privately under
`~/.local/share/omarchy-ring/node/`, verified against its published
SHA-256 checksum over HTTPS. This mirrors how go2rtc is already
installed, and the tarball bundles npm, so no `npm` package is needed.
- Point the units and the panel at a `~/.local/bin/omarchy-ring-node`
shim so the resolved runtime is used consistently.
- Record `managedNode` in the install marker, remove the shim on
uninstall, and drop a private runtime once a system one supersedes it.
`OMARCHY_RING_NODE_BINARY` / `OMARCHY_RING_NPM_CLI` keep overriding the
choice, and now fail loudly when they point at an unsupported runtime.
Setup no longer touches system Node.js, so a user's own version manager
is left alone.
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.
Setup cannot complete when
nodejsis installedSetup installs
nodejs-lts-jodthroughpacman -S --noconfirm. On any machine that already has thenodejspackage that is an unresolvable conflict — the two packages conflict, and--noconfirmcannot answer the replacement prompt:Two things make this worse than it first looks:
nodejsis commonly a dependency, not a choice. On the machine I hit this on it was pulled in bycursor-bin. The user never picked a Node version, and the plugin asks them to swap a system package to install a camera plugin.nodejsmoves past the supported 20/22/24 window, this returns.--noconfirmcan never resolve a package conflict, so the current code has no path out.Skipping the package does not help either —
verify_runtimethen rejects the system Node and exits.What this changes
Resolve the runtime instead of dictating it:
nodejs-lts-jodandnpmfrom the pacman list.~/.local/share/omarchy-ring/node/, verified against its published SHA-256 checksum over HTTPS. This mirrors howgo2rtcis already installed, and the tarball bundles npm, so thenpmpackage is no longer needed either.~/.local/bin/omarchy-ring-nodeshim, so all four call sites use the resolved runtime rather than a hardcoded/usr/bin/node.managedNodein the install marker, remove the shim on uninstall, and drop a private runtime once a system one supersedes it (otherwise it lingers as a ~200 MB orphan).OMARCHY_RING_NODE_BINARY/OMARCHY_RING_NPM_CLIkeep overriding the choice, and now fail loudly when they point at an unsupported runtime rather than failing later.The result is that setup no longer touches system Node.js at all, so a user's own version manager is left alone.
Verified
Beyond the test suite, I ran the download path for real: 29.6 MB, checksum matched, extracts to a working Node v22.23.2 with bundled npm 10.9.8, no temp files left behind. The full install then completed on Arch with the system
nodejs26 and amise-managed Node both left untouched, and the backend came up on the private runtime.I also confirmed
ring-mqttonly ever spawnsgo2rtc, nevernode, so the shim is sufficient.Tests
44 → 45. The new one stubs
curlto fail, proving a pre-staged private runtime is reused rather than re-downloaded. I checked the existing 44 pass onmainfirst, so the diff is the only thing moving them.One note on size: the private runtime is ~199 MB, of which
include/is 63 MB of C++ headers thatnpm ci --ignore-scriptsnever needs. Pruning it is a one-liner, but I left that call to you rather than slipping it in.Note: this touches
scripts/setup-native.shand the same tests as my other two PRs. I'll rebase whichever lands second.🤖 Generated with Claude Code