Reported by @NicolasHa. Verified against main.
In a monorepo where node_modules lives at website/node_modules rather than the repo root, workz start doesn't link it. A Node script resolving a dependency through createRequire(<repo>/website/package.json) then dies with MODULE_NOT_FOUND.
Adding "website/node_modules" to symlink_add fixes it, so this is a papercut rather than a blocker — but zero-config is what a new user relies on, and in a monorepo the interesting package.json is rarely at the root.
Cause (confirmed)
Two compounding reasons:
detect_project sets info.has_node = true only from a root package.json.
is_relevant("node_modules", project) returns has_node — so in a monorepo with only website/package.json, the built-in entry is filtered out and the skip is silent (see #32c).
- The built-in list names bare
node_modules, which is root-relative anyway.
Suggested fix
Walk the repo for package.json files (respecting ignores, bounded depth) and link each one's sibling node_modules. Same idea likely applies to other per-package artifacts in polyglot monorepos (.venv, target).
Related: #32 (the silence that hides this), and the reporter's [worktree] dir = ".worktrees" nesting works well and should keep working with this change.
Reported by @NicolasHa. Verified against
main.In a monorepo where
node_moduleslives atwebsite/node_modulesrather than the repo root,workz startdoesn't link it. A Node script resolving a dependency throughcreateRequire(<repo>/website/package.json)then dies withMODULE_NOT_FOUND.Adding
"website/node_modules"tosymlink_addfixes it, so this is a papercut rather than a blocker — but zero-config is what a new user relies on, and in a monorepo the interestingpackage.jsonis rarely at the root.Cause (confirmed)
Two compounding reasons:
detect_projectsetsinfo.has_node = trueonly from a rootpackage.json.is_relevant("node_modules", project)returnshas_node— so in a monorepo with onlywebsite/package.json, the built-in entry is filtered out and the skip is silent (see #32c).node_modules, which is root-relative anyway.Suggested fix
Walk the repo for
package.jsonfiles (respecting ignores, bounded depth) and link each one's siblingnode_modules. Same idea likely applies to other per-package artifacts in polyglot monorepos (.venv,target).Related: #32 (the silence that hides this), and the reporter's
[worktree] dir = ".worktrees"nesting works well and should keep working with this change.