Skip to content

[BUG] npm i -g fails with "This is related to npm not being able to find a file." #1458

@kevinsimper

Description

@kevinsimper

What / Why

Trying to install a package globally

$ npm i -g

I am using nvm

Using node v14.3.0 (npm v6.14.5)

Current Behavior

npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /Users/kevinsimper/.nvm/versions/node/v14.3.0/lib/node_modules/.staging/gcphelp-525ee4d5/node_modules/kleur
npm ERR! dest /Users/kevinsimper/.nvm/versions/node/v14.3.0/lib/node_modules/.staging/kleur-a910d726
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/kevinsimper/.nvm/versions/node/v14.3.0/lib/node_modules/.staging/gcphelp-525ee4d5/node_modules/kleur' -> '/Users/kevinsimper/.nvm/versions/node/v14.3.0/lib/node_modules/.staging/kleur-a910d726'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kevinsimper/.npm/_logs/2020-06-24T11_53_37_551Z-debug.log

Steps to Reproduce

$ nvm use 13
Now using node v13.1.0 (npm v6.4.1)
$ git clone [email protected]:kevinsimper/gcphelp-cli.git
$ npm i -g # works

$ nvm use 14
Now using node v14.3.0 (npm v6.14.5)
$ npm i -g # fails
# Error from above

Expected Behavior

It should install it globally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions