Config File Locator

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.

  1. Project level

    Highest priority

    Applies only inside one project.

    Config file location
    <project>/.npmrc
    Commands
    vi <project>/.npmrc
  2. User level

    Second priority

    Applies to your user account.

    Config file location
    ~/.npmrc
    Commands
    vi ~/.npmrc
  3. Global level

    Third priority

    Applies to every user of this npm installation.

    Config file location
    $PREFIX/etc/npmrc
    Commands
    npm config edit --location=global

Official npm documentation