npm config file locations
Find project, user, and global npm configuration file locations on macOS, Linux, and Windows.
Higher-priority files override the same setting in lower-priority files.
Project level
Highest priorityApplies only inside one project.
Config file location
<project>/.npmrcCommands
vi <project>/.npmrcUser level
Second priorityApplies to your user account.
Config file location
~/.npmrcCommands
vi ~/.npmrcGlobal level
Third priorityApplies to every user of this npm installation.
Config file location
$PREFIX/etc/npmrcCommands
npm config edit --location=global
Official npm documentation