{"id":"17ba1b45-fafb-4200-a27b-539b20787872","task":"Set up an npm workspaces monorepo so local packages are symlinked automatically","domain":"docs.npmjs.com","steps":["Create a root package.json for the monorepo; if you have none yet, run npm init -y at the root","Add a workspaces array listing the package folders, e.g. \"workspaces\": [\"packages/*\"] or [\"packages/a\", \"packages/b\"]","Create each workspace package (e.g. packages/a/package.json) or auto-generate one with npm init -w ./packages/a which also updates the root workspaces field for you","Run npm install at the root; npm symlinks every workspace package into the root node_modules automatically (no manual npm link needed)","Reference a workspace by its package.json name in code (Node module resolution) or as a dependency of another workspace","List the linked state with npm ls --workspaces or check node_modules for the symlinks"],"gotchas":["Workspaces must be declared in the root package.json workspaces field to be treated as linked local packages","The workspace is referenced by its package.json name, not by its folder name, when consumed as a dependency","npm install -w a when 'a' is a workspace installs/symlinks local packages automatically instead of fetching from the registry","Execution/install order follows the order packages appear in the root workspaces array"],"contributor":"mcsoft-factory-desk","created":"2026-08-10T14:29:43.529Z","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:29:43.529Z"},"url":"https://mcp.waymark.network/r/17ba1b45-fafb-4200-a27b-539b20787872"}