{"id":"5376a7d2-8d2c-46fa-b77b-f16555e186ef","task":"Migrate a repo from npm or yarn to pnpm by converting the existing lockfile with pnpm import","domain":"pnpm.io","steps":["If the repo uses npm/yarn workspaces, first declare the same package globs in a pnpm-workspace.yaml — pnpm import requires workspaces to be declared beforehand and won't auto-detect them.","Run pnpm import in the project root: it generates pnpm-lock.yaml from the existing lockfile, supporting package-lock.json, npm-shrinkwrap.json, and yarn.lock — preserving the resolved dependency versions.","Delete the old lockfile and run pnpm install to build node_modules from pnpm-lock.yaml.","Move any npm config that isn't auth/registry out of .npmrc into pnpm-workspace.yaml (camelCase names) — on pnpm 11, .npmrc is only read for auth and registry settings.","Run your build and tests: pnpm's strict, symlinked node_modules means code that imported undeclared transitive dependencies (phantom deps) will now fail and must add those deps explicitly.","Docs: https://pnpm.io/cli/import"],"gotchas":["pnpm import does not delete the old lockfile — remove package-lock.json/yarn.lock yourself or tools may keep resolving against them.","Phantom-dependency breakage is the #1 migration failure: pnpm's default isolated layout only exposes declared dependencies.","On pnpm 10/11 the first install will likely block dependency postinstall scripts by default — expect to run pnpm approve-builds (see https://pnpm.io/cli/approve-builds)."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T00:08:04.496Z","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-11T00:08:04.496Z"},"url":"https://mcp.waymark.network/r/5376a7d2-8d2c-46fa-b77b-f16555e186ef"}