Pnpm: updating pnpm to v5.6.0 fails with cryptic error message

Created on 17 Sep 2020  Â·  4Comments  Â·  Source: pnpm/pnpm

pnpm version:

v5.5.13

Error log:

https://gist.github.com/ExE-Boss/14fdb044303f7baa5055789c1fc29d32

Additional information:

  • node -v prints: v14.11.0
  • Windows, OS X, or Linux?: Windows

Most helpful comment

this is fixed

All 4 comments

probably caused by a regression in v5.5.13 that I fixed here https://github.com/pnpm/pnpm/commit/7f74cd173f12e512f64c0c579afa089a31f6ba12

try to update pnpm with npm

This happened in [email protected]:

> npx [email protected] -g add pnpm@^5.6.0
 ERROR  UNKNOWN: unknown error, link 'D:\Programs\NodeJS\pnpm-global\.pnpm-store\v3\files\9c\8b2def76ae5ffe4d636166bf9635d7abd69cdac4bf819a2145f7969646d39ae95c96364bc117f9fa544b98518c294233455d4f665af430c75d70798dd4ab13' -> 'D:\Programs\NodeJS\pnpm-global\4\node_modules\.pnpm\[email protected]\node_modules\_tmp_2092_d6dbb7c5c045b039d8a927d44aa793cb\lib\node_modules\xdg-basedir\license'
at pnpm\pnpm
Progress: resolved 131, reused 130, downloaded 1, added 0
internal/fs/utils.js:298
    throw err;
    ^

Error: EEXIST: file already exists, mkdir 'node_modules'
    at Object.mkdirSync (fs.js:947:3)
    at process.<anonymous> (D:\Programs\NodeJS\npm-cache\_npx\2092\node_modules\pnpm\lib\node_modules\@pnpm\file-reporter\lib\index.js:24:12)
        -> D:\Programs\NodeJS\npm-cache\_npx\2092\node_modules\pnpm\lib\node_modules\@pnpm\file-reporter\src\index.ts:26:8
    at process.emit (events.js:326:22)
    at processEmit [as emit] (D:\Programs\NodeJS\npm-cache\_npx\2092\node_modules\pnpm\lib\node_modules\signal-exit\index.js:155:35)
    at process.exit (internal/process/per_thread.js:167:15)
    at Timeout._onTimeout (D:\Programs\NodeJS\npm-cache\_npx\2092\node_modules\pnpm\lib\err.js:20:30)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7) {
  errno: -4075,
  syscall: 'mkdir',
  code: 'EEXIST',
  path: 'node_modules'
}

it happens while you are installing v5.6.0 using pnpm v5.5.13

a workaround is to run pnpm install --global --package-import-method=hardlink pnpm

this is fixed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Dmitry-N-Medvedev picture Dmitry-N-Medvedev  Â·  4Comments

davidcallanan picture davidcallanan  Â·  4Comments

mtford90 picture mtford90  Â·  4Comments

andreineculau picture andreineculau  Â·  3Comments

andreineculau picture andreineculau  Â·  5Comments