How do I fix npm's global location?

前端 未结 2 1980
别那么骄傲
别那么骄傲 2020-12-14 00:34

When I run

npm ls -g

I get back

-> /usr/local/lib64/usr/local/bin
(empty)

Which is obviously incorrect. Us

2条回答
  •  春和景丽
    2020-12-14 01:01

    For those on Windows the npmrc file can be found in C:\path\to\nodejs\node_modules\npm\npmrc. You can change the prefix as mentioned in the answer by cmaxo. By default it's usually something like ${APPDATA}\npm.

提交回复
热议问题