pnpm: pnpm install stuck for ~2 minutes

When I run pnpm install it gets stuck. I didn’t understand if there is a pattern or not, sometimes it gets stuck, sometimes it doesn’t.

pnpm version:

7.1.0

Code to reproduce the issue:

When I run pnpm i it starts do its job, then it gets stuck for ~2 min, then I get a  ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies.

The full message is:

 ERR_PNPM_PEER_DEP_ISSUES  Unmet peer dependencies

.
├─┬ @typechain/hardhat
│ └── ✕ missing peer lodash@^4.17.15
├─┬ @typechain/truffle-v5
│ └── ✕ missing peer truffle@^5.0.0
└─┬ @typechain/ethers-v5
  ├── ✕ missing peer @ethersproject/bytes@^5.0.0
  └── ✕ missing peer @ethersproject/abi@^5.0.0
Peer dependencies that should be installed:
  @ethersproject/abi@^5.0.0    lodash@^4.17.15              
  @ethersproject/bytes@^5.0.0  truffle@^5.0.0

This is node_modules/.pnpm-debug.log:

"err": {
      "name": "pnpm",
      "message": "Unmet peer dependencies",
      "code": "ERR_PNPM_PEER_DEP_ISSUES",
      "stack": "pnpm: Unmet peer dependencies\n    at default_1 (/home/vrde/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:119805:15)\n    at _installInContext (/home/vrde/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:120522:48)\n    at async installInContext (/home/vrde/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:120565:16)\n    at async _install (/home/vrde/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:120167:25)\n    at async mutateModules (/home/vrde/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:119953:23)\n    at async install (/home/vrde/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:119911:24)\n    at async handler (/home/vrde/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:121558:31)\n    at async /home/vrde/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:176441:21\n    at async run (/home/vrde/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:176415:34)\n    at async runPnpm (/home/vrde/.nvm/versions/node/v16.15.0/lib/node_modules/pnpm/dist/pnpm.cjs:176633:5)"
    }

Expected behavior:

I expect PNPM to not get stuck when installing packages.

Actual behavior:

PNPM stays ~2 min stuck when installing packages.

Additional information:

  • node -v prints: v16.15.0
  • Windows, macOS, or Linux?: Linux

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 20 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Try v7.1.1

There is a bizarre issue with installing github dependencies right now: https://github.com/npm/cli/issues/4896

This seems to be affecting both pnpm and npm (version 6). Did the delays start on May 13 and are they for repos with github dependencies?

It is attempting to use git protocol, even when explicitly set to ssh. e.g. in package.json:

"jsonql": "git+ssh://git@github.com:mWater/jsonql.git",

But running pnpm i causes network traffic to git port:

$ netstat | grep git
tcp        0      1 clayton-desktop:56362   lb-140-82-112-4-iad:git SYN_SENT   
tcp        0      1 clayton-desktop:56388   lb-140-82-112-4-iad:git SYN_SENT   
tcp        0      1 clayton-desktop:56360   lb-140-82-112-4-iad:git SYN_SENT   
tcp        0      1 clayton-desktop:56358   lb-140-82-112-4-iad:git SYN_SENT   

And git protocol is no longer supported by GitHub:

https://github.blog/2021-09-01-improving-git-protocol-security-github/

This is with latest pnpm (7.1.0)

@vrde So, yes, same bug. Is for github.com/ethereumjs/ethereumjs-abi

Back to being blazing fast again! Thanks @zkochan 🙏

$ time pnpm i -D 'esbuild-kit/tsx#built/repl'
Packages: +9
+++++++++
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: ~/Library/pnpm/store/v3
  Virtual store is at:             node_modules/.pnpm
Progress: resolved 28, reused 9, downloaded 0, added 9, done

devDependencies:
+ tsx 0.0.0-semantic-release
pnpm i -D 'esbuild-kit/tsx#built/repl'  1.30s user 0.27s system 68% cpu 2.304 total

@zkochan would you mind releasing a patch version please, when time permits?

node: v11.13.0 npm: v6.7.0

Our npm ci build step duration increased from ~4min to ~45min.

Solved by replacing github protocol with https at package-lock.json & package.json e.g.:

-    "angular-daterangepicker": "github:fragaria/angular-daterangepicker",
+    "angular-daterangepicker": "https://github.com/fragaria/angular-daterangepicker",

For me this happens when installing packages from github