Skip to content

fix: use absolute node path in systemd service unit#392

Merged
ng merged 1 commit intodevfrom
fix/install-node-path
Apr 7, 2026
Merged

fix: use absolute node path in systemd service unit#392
ng merged 1 commit intodevfrom
fix/install-node-path

Conversation

@ng
Copy link
Copy Markdown
Contributor

@ng ng commented Apr 7, 2026

Summary

  • ExecStart used bare node which resolves to /usr/bin/node (Yocto's v16) instead of /usr/local/bin/node (v22 installed by the script)
  • Causes 500 errors on startup — Next.js 16 uses syntax unsupported by Node 16
  • Also sets PATH in the unit so any child processes resolve correctly

Test plan

  • Verified on Pod: bare node → v16 → 500; /usr/local/bin/node → v22 → working
  • Fresh install on Pod confirms service starts with correct Node version

Summary by CodeRabbit

  • Bug Fixes
    • Improved service startup reliability by ensuring proper resolution of system dependencies required for the application to run successfully.

Bare `node` resolves to /usr/bin/node (Yocto v16) instead of
/usr/local/bin/node (v22 installed by this script). Causes 500 errors
on startup when Next.js hits syntax unsupported by Node 16.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3b34607f-b786-4f9b-a952-6b6e1d730cbb

📥 Commits

Reviewing files that changed from the base of the PR and between 32d4d53 and 84e9970.

📒 Files selected for processing (1)
  • scripts/install

📝 Walkthrough

Walkthrough

Updated the sleepypod.service systemd unit configuration to use an absolute path for the Node.js binary and explicitly set the PATH environment variable. This ensures proper binary resolution when the service starts the Next.js standalone server.

Changes

Cohort / File(s) Summary
Systemd Service Configuration
scripts/install
Modified the generated sleepypod.service unit to invoke node via absolute path (/usr/local/bin/node) and added explicit Environment="PATH=/usr/local/bin:/usr/bin:/bin" directive to ensure binary resolution for node and pnpm.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 A path made absolute, no mystery left,
The rabbit hops forward with systemd finesse,
No "exec" to ponder, just NODE declared clear,
Binaries found swift, the service runs dear!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: using an absolute node path in the systemd service unit to resolve version conflicts between system and installed Node.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/install-node-path

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.

@ng ng merged commit 998598a into dev Apr 7, 2026
6 checks passed
@ng ng deleted the fix/install-node-path branch April 7, 2026 06:03
@ng ng mentioned this pull request Apr 13, 2026
4 tasks
ng added a commit that referenced this pull request Apr 13, 2026
## Summary

Promotes everything on \`dev\` since the last main release (82 commits,
143 files, +9239/-2699).

### Headlining features
- **Schedule redesign (#303)** — read-only schedule view with explicit
curve management, full-screen \`CurveEditor\` (day picker + bedtime/wake
+ temp range + presets), \`Left | Right | Both\` side selector,
active-curve highlight, atomic \`batchUpdate\` writes, day-conflict
resolution, sparkline cards.
- **Mini feature flag (#420)** — \`ENABLE_MINI\` env var; PubNub moved
to \`optionalDependencies\`; conditional Mini router import.
- **Auto-off on no presence (#301)** — schedule respects bed presence.
- **Auto-unblock internet during update check (#308)**.
- **Schedule batchUpdate cap raised to 1000 (#424)** — fixes AI-curve
apply-to-all-days rejection.

### Operational fixes
- Pod 3 install path (#383, #384, #386, #392)
- Yocto image Python venv (#336)
- DAC socket / Avahi on device startup (#331)
- Free-sleep/sleepypod switch persistence (#337)
- Cross-machine standalone deploys (#308)
- Temperature unit conversion (#333)

### Dependency updates
~20 renovate PRs across React 19.2.5, Next 16.2.3, vitest 4.1.4,
tanstack/react-query 5.97.0, tRPC 11.16, lucide-react 1.x, etc.

### Misc
- ADR 0017 (uv) compiled into deployment wiki
- Snoo pentest methodology + recon plan
- Git hooks + ESLint cleanup (#313)
- CI hardening (#388)

## Test plan
- [x] All unit tests pass on dev (606+ tests)
- [x] Typecheck clean
- [x] Build succeeds (standalone output)
- [x] Deployed to Pod 4 at \`192.168.1.88\` and smoke-tested:
  - schedule on/off
  - create curve from preset
  - edit curve, change days, save
  - day-conflict reassign dialog
  - delete curve
  - side selector left/right/both
  - active-curve highlighting + next set point
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant