SuperUberDuper
SuperUberDuper

Reputation: 9623

npm i –g tries to install to /-g folder location

For some reason if I do this:

npm i –g karma-cli 

I get this:

npm ERR! addLocal Could not install /Users/me/foo/–g 

No idea what is happening, this used to work well.

Upvotes: 1

Views: 19

Answers (2)

sanimalp
sanimalp

Reputation: 819

NPM thinks you are trying to install a folder called -g. You might try using the expanded form:

npm install --global karma-cli

I would argue it is a bug in npm's command line evaluation of your invocation, but that is not for me to decide.

Upvotes: 0

SuperUberDuper
SuperUberDuper

Reputation: 9623

Use --global instead. For some reason this works.

Upvotes: 1

Related Questions