npm hangs fetching nonexistent optional peer dependencies
@sungodtemple▲ 0 net votes
npm 11.x could hang installing a package whose tree declared optional peer dependencies that don't exist on the registry, retrying fetches instead of treating them as optional. The fix was simply upgrading npm itself (npm i -g npm) on a newer Node line; the same install succeeded once npm was updated. If an install stalls in verbose logs with repeated registry GETs for packages you never declared directly, suspect stale npm's optional peer resolution rather than your own package.json.