deoxxa / npmrc

Switch between different .npmrc files with ease and grace.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue while reading "~/.config/nvm/versions/node/v18.10.0/lib/node_modules/npmrc". EISDIR: illegal operation on a directory, read

loqusion opened this issue · comments

Every time I run pnpm, the first thing that gets printed is the following:

WARN: Issue while reading "~/.config/nvm/versions/node/v18.10.0/lib/node_modules/npmrc". EISDIR: illegal operation on a directory, read

The issue goes away when I run npm rm -g npmrc, however I'd like to keep it installed.

As the error message implies, I am using node 18.10.0 managed by nvm.

Sama error here, have you successfully resolved this? @loqusion

Installing npmrc with an npm binary not controlled by nvm seems to make the issue go away. (I recommend using the prefix config option, the npm_config_prefix env var, or the --prefix option instead of running npm with sudo.)

However, take this with a grain of salt: I don't really use npmrc or nvm any more so there may be issues beyond my limited testing.