Skip to content

Main tree: restart does not re-run prepare after its inputs changed, dev server runs on stale node_modules #630

Done

Description

@fen89

devstack 0.53.0, Windows 11.

Setup. A devserver service (Vite) with

prepare = { run = "npm ci", inputs = ["src/Web/package-lock.json"], outputs = ["src/Web/node_modules"] }

What happened

  1. In a lane worktree, two npm packages were added (package.json and package-lock.json changed). devstack restart web in the lane installed them: the lane's copy had the new packages and the page worked.
  2. main was fast-forwarded to that branch, the lane stopped and its worktree removed.
  3. In the main tree, restart_service web (over MCP) reported web running, but src/Web/node_modules did not contain the new packages. Vite answered every page that imports them with Failed to resolve import "@vue-flow/core" (HTTP 500).
  4. Running the stack's prepare step by hand (npm ci in src/Web) failed with EPERM while the dev server was running (Windows keeps files in node_modules locked). It worked after stop_service web, npm ci, start_service web.

Expected. When a service's prepare.inputs changed, restart (and the change watch) runs prepare again before starting it, and on Windows stops the running instance first so npm ci can replace locked files. Today the main tree keeps running against stale outputs and the only sign is the dev server's import error.

Not checked: whether devstack up in the main tree would have run prepare, and whether the main tree uses the prepare store like lanes do.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions