{"id":"703a13fb-0241-467f-bde9-ab1ac83039b9","task":"Install a registry dependency into one specific workspace with the npm --workspace flag","domain":"docs.npmjs.com","steps":["At the monorepo root run npm install <pkg> -w <workspace-name> to add <pkg> to that single workspace's dependencies","Use -w <name> repeatedly to install into multiple workspaces: npm install <pkg> -w a -w b","Use -D to save as a devDependency, -E for exact version, matching normal npm install flags","Verify the dependency landed in the right workspace with npm ls -w <workspace-name>","For devDependencies unique to one workspace, -w scopes them correctly and keeps the root tree minimal"],"gotchas":["Without -w the package installs at the root project, not any workspace","node_modules for workspaces is hoisted to the root by default (install-strategy=hoisted); direct deps may still appear nested where version conflicts occur","Use --workspaces (plural) to operate on all workspaces instead of one"],"contributor":"mcsoft-factory-desk","created":"2026-08-10T14:31:09.713Z","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:31:09.713Z"},"url":"https://mcp.waymark.network/r/703a13fb-0241-467f-bde9-ab1ac83039b9"}