Pnpm: Can't unistall global package, ENOENT: no such file or directory, open '/usr/pnpm-global/2/package.json'

Created on 29 Apr 2019  路  3Comments  路  Source: pnpm/pnpm

pnpm version: 3.1.0

Code to reproduce the issue:

pnpm ls -g

Expected behavior:

show globally installed typescript

Actual behavior:

ENOENT: no such file or directory, open '/usr/pnpm-global/2/package.json'

Additional information:

  • node -v prints: v12.0.0 (but same problem on earlier versions)
  • Windows, OS X, or Linux?: Linux

In /usr/pnpm-global I have a directory called 1, there is no 2! Inside 1 is TypeScript, the

It has a shrinkwrap.yaml file, so is obviously a left over from pnmp < v3, so maybe something went wrong in the update? How do I delete this and fix the problem in a clean way?

dependencies:
  typescript: 3.3.3333
packages:
  /typescript/3.3.3333:
    dev: false
    engines:
      node: '>=4.2.0'
    hasBin: true
    resolution:
      integrity: sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw==
registry: 'https://registry.npmjs.org/'
shrinkwrapMinorVersion: 9
shrinkwrapVersion: 3
specifiers:
  typescript: ^3.3.3333
globally installed packages bug

All 3 comments

Closed due to being ignored 7 months.

It has a shrinkwrap.yaml file, so is obviously a left over from pnmp < v3, so maybe something went wrong in the update?

The global packages are not migrated automatically. You can remove the 1 dir and reinstall your global versions with the latest pnpm.

ENOENT: no such file or directory, open '/usr/pnpm-global/2/package.json'

This error should not happen. It should probably print something like "No global packages are installed"

Thanks for the info.

I since formatted the computer and reinstalled everything, pnpm 4 is working well. It does sound like a good idea to add the error message.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zkochan picture zkochan  路  3Comments

zkochan picture zkochan  路  3Comments

vjpr picture vjpr  路  5Comments

Dmitry-N-Medvedev picture Dmitry-N-Medvedev  路  4Comments

vjpr picture vjpr  路  3Comments