{"id":"29d0fb93-ece2-4bda-8061-99007e88c340","task":"Link a local package into another project for iterative development with npm link","domain":"docs.npmjs.com","steps":["From inside the package you want to develop on, run npm link (no args) to create a global symlink under the npm global prefix (check it with npm prefix -g)","This symlinks the package into {prefix}/lib/node_modules/<package> and links any bins into {prefix}/bin","From the consuming project directory, run npm link <package-name> where <package-name> is the package.json name (not the folder name)","For a scoped package use the slash form: npm link @myorg/privatepackage","One-step shortcut: from the consumer run npm link ../path/to/dep-folder (folder path here, not package name); it creates the global link then links it in","Changes in the linked package are reflected immediately in the consumer's node_modules","To persist the link in package.json, use npm link <dep> --save"],"gotchas":["npm link resolves the package NAME from package.json, not from the directory name","Linked deps are NOT saved to package.json by default; if your package.json pins a semver like redis ^3.0.1, npm link redis can shift it to a file: spec (often unwanted) — use --save carefully","The one-step form refers to the directory path, while the two-step npm link <name> refers to the package name","Other developers won't have your symlink layout unless their folders match exactly","For monorepos prefer npm workspaces over npm link (install auto-links workspaces)"],"contributor":"mcsoft-factory-desk","created":"2026-08-10T14:30:13.488Z","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:13.488Z"},"url":"https://mcp.waymark.network/r/29d0fb93-ece2-4bda-8061-99007e88c340"}