Skip to content

Resolve Nix deployment errors#41

Merged
danieldaquino merged 1 commit into
damus-io:masterfrom
danieldaquino:upgrade_to_node_20
May 21, 2026
Merged

Resolve Nix deployment errors#41
danieldaquino merged 1 commit into
damus-io:masterfrom
danieldaquino:upgrade_to_node_20

Conversation

@danieldaquino
Copy link
Copy Markdown
Collaborator

@danieldaquino danieldaquino commented May 21, 2026

This addresses Nix deployment errors due to:

  • a node-packages.nix file that was out of sync with the new package-lock.json (due to an upgrade from express v4 -> v5 in a previous commit)
  • Node.js v18 being unsupported because of its End-Of-Life status.

The errors were addressed by upgrading the Node.JS version to the next maintained version (currently v20), and running ./nixify to update the Nix configuration.

Testing

Nix channel: https://nixos.org/channels/nixos-25.05
Node.js: v20.19.3
OS: macOS 26.4

  1. Check that ./nixify (which includes a nix build) runs successfully
  2. Check that running npm test passes

Test result: PASS

Summary by CodeRabbit

  • Chores
    • Upgraded Node.js runtime from version 18 to version 20 across all production and development configurations.
    • Updated all npm package dependencies to their latest compatible versions for improved stability and performance.
    • Enhanced the development environment setup to fully support Node.js 20.
    • Refreshed build scripts to ensure compatibility with the new Node.js version.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Warning

Rate limit exceeded

@danieldaquino has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 16 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2785e2c2-a7a5-42de-beab-c27e59b22b71

📥 Commits

Reviewing files that changed from the base of the PR and between d26569e and 3b7e958.

📒 Files selected for processing (5)
  • .github/workflows/node.js.yml
  • default.nix
  • nixify
  • node-packages.nix
  • shell.nix
📝 Walkthrough

Walkthrough

This PR upgrades the Node.js runtime from version 18 to 20 across the Nix configuration, build pipeline, and npm dependency graph. Default parameters and shell development tooling are updated to nodejs_20, the build script explicitly pins the package name during node2nix generation, and the npm dependency manifest is refreshed with compatible versions.

Changes

Node.js Version Upgrade

Layer / File(s) Summary
Nix configuration defaults
default.nix, shell.nix
Top-level Nix function default parameter switches from nodejs_18 to nodejs_20, and development shell buildInputs includes nodejs_20.
Build script nodejs_20 pin
nixify
Build script is updated to pass --pkg-name nodejs_20 to node2nix instead of the previous -18 flag, and ensures node_modules is cleaned before regeneration.
npm dependency sources and graph
node-packages.nix
node2nix-generated npm package sources and dependency graph are updated with nodejs_20-compatible versions. Express middleware stack (accepts, body-parser, express, finalhandler, http-errors, send, serve-static, type-is) and transitive dependencies (cookie, debug, iconv-lite, mime-db, mime-types, qs, raw-body, statuses) are upgraded to newer releases. Helper packages like call-bind-apply-helpers, dunder-proto, es-*, get-proto, math-intrinsics, object-inspect, once, path-to-regexp, router, and side-channel* variants are added or updated with corresponding source URLs and checksums.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 From eighteen to twenty we hop and we bound,
Updated the node-tree from root to the ground,
New packages compiled with checksums so bright,
The build script now promises dependencies right! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Resolve Nix deployment errors' is vague and generic, using non-descriptive language that doesn't convey the specific nature of the changes (Node.js upgrade from v18 to v20 and dependency updates). Consider a more specific title such as 'Upgrade Node.js to v20 and update Nix dependencies' to clearly communicate the primary changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
nixify (1)

1-4: ⚡ Quick win

Add set -euo pipefail for fail-fast behavior.

Without it, a failure in rm -rf or node2nix is silently ignored and nix-build still runs against a possibly stale/partial state, producing confusing downstream failures during deployment.

♻️ Proposed fix
 #!/usr/bin/env bash
+set -euo pipefail
 rm -rf node_modules
 node2nix --pkg-name nodejs_20 -l package-lock.json
 nix-build -A package
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@nixify` around lines 1 - 4, Add a fail-fast shell option line immediately
after the shebang in the nixify script: insert set -euo pipefail as the first
executable line after #!/usr/bin/env bash so the subsequent commands (rm -rf
node_modules, node2nix --pkg-name nodejs_20 -l package-lock.json, nix-build -A
package) will stop on errors or unset variables; ensure no other commands run
before this line so it takes effect for the whole script.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@nixify`:
- Around line 1-4: Add a fail-fast shell option line immediately after the
shebang in the nixify script: insert set -euo pipefail as the first executable
line after #!/usr/bin/env bash so the subsequent commands (rm -rf node_modules,
node2nix --pkg-name nodejs_20 -l package-lock.json, nix-build -A package) will
stop on errors or unset variables; ensure no other commands run before this line
so it takes effect for the whole script.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a55b8ed5-ef3c-4a0e-abf0-0dec6c6cdfc1

📥 Commits

Reviewing files that changed from the base of the PR and between 86275b6 and d26569e.

📒 Files selected for processing (4)
  • default.nix
  • nixify
  • node-packages.nix
  • shell.nix

@danieldaquino danieldaquino merged commit 9a0e426 into damus-io:master May 21, 2026
2 checks passed
@danieldaquino
Copy link
Copy Markdown
Collaborator Author

CC @jb55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant