Skip to content

Child processes inherit Node 16 even when daemon runs on Node 18 #1

Open

Description

@mayoalexander

Bug

When the daemon starts via nohup in daemonctl, the PATH passed to child processes still resolves to Node 16 (nvm default) even if the daemon itself was started with nvm use 18.

Root cause: nohup doesn't inherit nvm shell functions, so child npm/node calls resolve to the nvm default alias, not the active version.

Impact: Playwright tasks fail immediately with You are running Node.js 16.20.2. Playwright requires Node.js 18 or higher.

Workaround (shipped in 7d4cdc9)

  • resolveNode18Path() in task-executor.js finds highest available Node (22 > 20 > 18) from ~/.nvm/versions/node/ and prepends its bin dir to PATH for all spawned children.
  • daemonctl start also resolves Node 18+ and sets PATH before nohup.

Remaining risk

  • Users without nvm (e.g., Homebrew Node, fnm, volta) won't benefit from resolveNode18Path(). Should add fnm/volta detection.
  • The daemonctl PATH fix only works for fresh starts, not if daemon was already running.

Severity: High — blocks all Playwright-based tasks on nvm setups
Status: Fixed in 7d4cdc9, needs fnm/volta support

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions