pnpm: Running install hangs

pnpm hangs when running a clean install. It also happens when I try to install a single, relatively large package (i. e. webpack or react).

After downloading some of the packages fairly quickly the command just hangs without any progress:

$ pnpm install webpack-dev-server@2.7.1
$ Resolving: total 250, reused 1, downloaded 242

I tried to limit the number of HTTP connections. It results in the hang happening much earlier:

$ pnpm install webpack-dev-server@2.7.1 --network-concurrency 1
$  WARN  waiting for another installation to complete...
$ Resolving: total 13, reused 0, downloaded 13

I tried removing contents of ~./pnpm-store. I’m not using a VPN.

I used:

  • pnpm version: 1.23.1
  • node -v prints: v6.12.0
  • Linux

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 25 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Same issue with 2.23.1 on Linux. To reproduce, run pnpm multi install and press Ctrl+S to pause the process. Wait a few minutes, then press Ctrl+Q to resume.

$ pnpm multi install
Scope: all 3 workspace packages
Resolving: total 33, reused 0, downloaded 24
/usr/lib/node_modules/pnpm/lib/node_modules/proper-lockfile/index.js:186
    compromised = compromised || function (err) { throw err; };
                                                  ^

Error: Unable to update lock within the stale threshold
    at options.fs.utimes (/usr/lib/node_modules/pnpm/lib/node_modules/proper-lockfile/index.js:108:66)
    at FSReqCallback.args [as oncomplete] (fs.js:147:20)

$ pnpm multi install
Scope: all 3 workspace packages
.                                        |  WARN  waiting for another installation to complete...

^ never finishes, even though no installation is in progress. Had to delete the directory in ${PNPM_STORE}/2/_locks.

6 years later… Insane

pnpm install hangs indefintitely

OS: MacOS Ventura Arch: Apple M2 Max NodeVersion: 18.16.0

┬─[thebeachmaster@orion:~/g/t/???]─[17:00:25]─[G:develop=]
╰─>$ pnpm install                                                                                                                                                                                                     164ms  Thu Aug 31 17:00:25 2023
Downloading registry.npmjs.org/next/13.4.19: 12.97 MB/12.97 MB, done
Downloading registry.npmjs.org/react-icons/4.10.1: 20.69 MB/20.69 MB, done
Progress: resolved 18, reused 0, downloaded 18, added 0


<--Hang for 6 minutes, I had to cancel--->

^C⏎                                                                                                                                                                                                                                                   ┬─[thebeachmaster@orion:~/g/t/???]─[17:07:43]─[G:develop=]
╰─>$ npm install                                                                                                                                                                                                       6.6m  Thu Aug 31 17:07:43 2023

added 357 packages, and audited 358 packages in 37s

109 packages are looking for funding
  run `npm fund` for details

3 vulnerabilities (2 moderate, 1 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
┬─[thebeachmaster@orion:~/g/t/???]─[17:08:43]─[G:develop=]
╰─>$  

updated node to 20.5 and it worked

6 years later… Insane

pnpm install hangs indefintitely

OS: MacOS Ventura Arch: Apple M2 Max NodeVersion: 18.16.0

┬─[thebeachmaster@orion:~/g/t/???]─[17:00:25]─[G:develop=]
╰─>$ pnpm install                                                                                                                                                                                                     164ms  Thu Aug 31 17:00:25 2023
Downloading registry.npmjs.org/next/13.4.19: 12.97 MB/12.97 MB, done
Downloading registry.npmjs.org/react-icons/4.10.1: 20.69 MB/20.69 MB, done
Progress: resolved 18, reused 0, downloaded 18, added 0


<--Hang for 6 minutes, I had to cancel--->

^C⏎                                                                                                                                                                                                                                                   ┬─[thebeachmaster@orion:~/g/t/???]─[17:07:43]─[G:develop=]
╰─>$ npm install                                                                                                                                                                                                       6.6m  Thu Aug 31 17:07:43 2023

added 357 packages, and audited 358 packages in 37s

109 packages are looking for funding
  run `npm fund` for details

3 vulnerabilities (2 moderate, 1 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
┬─[thebeachmaster@orion:~/g/t/???]─[17:08:43]─[G:develop=]
╰─>$  

command: pnpm install stuck at:

Lockfile is up to date, resolution step is skipped Packages: +1252 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Downloading registry.npmjs.org/typescript/5.1.6: 7.15 MB/7.15 MB, done Packages are hard linked from the content-addressable store to the virtual store. Content-addressable store is at: D:.pnpm-store\v3 Virtual store is at: node_modules/.pnpm Progress: resolved 1252, reused 1251, downloaded 1, added 1

node version : v18.17.0 pnpm version: 8.6.9

I have a found a place where pnpm can silently hang:

https://github.com/pnpm/package-store/blob/359fe907a5d67ecb59da86249470013e121a180f/src/storeController/index.ts#L45-L48

When pnpm waits for a store lock, nothing is printed to the console.