Skip to content

fix(deploy): pin Nixpacks Node 22.23 so the Vite 8 build works - #941

Merged
simon-lowes merged 1 commit into
mainfrom
fix/nixpacks-node-22-23
Oct 22, 2026
Merged

simon-lowes merged 1 commit into
mainfrom
fix/nixpacks-node-22-23

Conversation

@simon-lowes

Copy link
Copy Markdown
Owner

Why

The Dokploy deploy fails:

Nixpacks v1.41.0 · setup: nodejs_22, npm-9_x   → nodejs-22.11.0
> tsc -b --noCheck && vite build
Error: Cannot find native binding ... Cannot find module '@rolldown/binding-linux-x64-gnu'
❌ Nixpacks build failed

Nixpacks' own nixpkgs archive pins Node 22.11.0. Vite 8's bundler, rolldown, needs Node >=22.12 for its native binding, so npm treats @rolldown/binding-linux-x64-gnu as an incompatible optional dependency and silently skips it. Every deploy since the Vite 8 upgrade has failed this way. The site was last deployed in March. (Auto-deploy had also stopped firing; that is being fixed separately with repo webhooks.)

What

  • New nixpacks.toml pins nodejs_22 to a nixpkgs-unstable channel revision giving 22.23.3, prebuilt in the Nix cache. This is the same approach simonlowes and dylan-a-day use. A TODO explains how to bump it to 22.23.4, which has the 21 Oct security fixes, once that version reaches a channel.
  • engines.node is now >=22.12.0, so the requirement is explicit.
  • overrides.react / overrides["react-dom"] are now "$react" / "$react-dom" instead of a hard-coded 19.2.8. A pinned override makes every Dependabot react bump fail with EOVERRIDE, as it did in dylan-a-day. The existing Dependabot react group keeps the pair together.

Verified locally

npm ci ✓ · npm run build ✓ (lockfile change: root engines only)


Generated by Claude Code

…act overrides follow deps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTBz9Dsf82B143eLnbciNm
@simon-lowes
simon-lowes merged commit a568c4c into main Oct 22, 2026
5 checks passed
@simon-lowes
simon-lowes deleted the fix/nixpacks-node-22-23 branch October 22, 2026 20:28
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.

2 participants