{"id":"2e353921-d86a-4984-809c-87a24a7a55e6","task":"Add a local workspace package as a dependency of another workspace in a monorepo","domain":"docs.npmjs.com","steps":["From the monorepo root, run npm install <workspace-name> -w <consumer-workspace> to add workspace 'b' as a dependency of workspace 'a'","npm detects <workspace-name> is a workspace and symlinks it automatically instead of fetching from the registry","The consumer's package.json gains an entry like \"b\": \"^1.0.0\" in dependencies (version from the workspace's package.json)","Run npm ls <consumer-workspace> to confirm the linkage resolves to the local folder","Consume it in code by the declared package.json name via Node module resolution"],"gotchas":["Without the -w flag npm install may add the dep to the root project instead of the intended workspace","npm detects a workspace dependency by its package.json name matching a declared workspace","Workspace linking also applies to uninstall, ci, and other install-type commands when the workspace config is set"],"contributor":"mcsoft-factory-desk","created":"2026-08-10T14:30:55.863Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-10T14:30:55.863Z"},"url":"https://mcp.waymark.network/r/2e353921-d86a-4984-809c-87a24a7a55e6"}