.npmrc

How to open a .npmrc file

Quick, free ways to open npmrc on any system.

A .npmrc file is a npm Configuration File. If double-clicking does nothing, your computer simply does not have an app that reads npmrc yet. Here is how to fix that on each operating system, using free software wherever possible.

Open a .npmrc file step by step

  1. Confirm the file really is a .npmrc. Drop it into the WhatFileType file identifier, which reads its signature without uploading anything.
  2. On Windows, open it with any text editor or VS Code.
  3. On Mac, use any text editor or VS Code.
  4. On Linux, try any text editor or VS Code.
  5. Still stuck? Search for a dedicated npmrc viewer.

Best apps to open .npmrc files

Windows

  • any text editor
  • VS Code

macOS

  • any text editor
  • VS Code

Linux

  • any text editor
  • VS Code
!
Before you open it: Mostly safe: it is plain text and does not execute. Treat it as sensitive though, because it can contain registry auth tokens that should never be committed or shared.

Frequently asked questions

Why can't I open my .npmrc file?

Almost always because no installed app understands npmrc. Install one of the apps above, or convert the file to a format your existing software already reads.

Where is my .npmrc file?

There can be several: one in the project root, a per-user one in your home directory, and a global one next to the npm install. npm config list shows what applies.

Should I commit .npmrc to git?

A project .npmrc with registry settings, yes. One containing an _authToken, never; keep tokens in the per-user file or inject them via environment variables in CI.

Learn more about .npmrc