By Debmedia Technologies LLP · Kolkata, India · Updated
What Is It and When Do You Need It?
The .npmrc file controls where npm gets packages and how it logs in. A typo or a leaked token causes failed installs or a security problem.
Paste the file and read the report.
How to Use This Tool
- Enter or paste your input in the box or boxes above.
- Choose the options, if there are any.
- Press the button to run the tool.
- Read the result and use the copy button where one is shown.
How the Calculation Works
Each line is read as a comment, a blank line or key=value. The tool checks the key against a list of known npm settings, checks values for yes/no settings, checks that registry values are URLs that use https, spots auth keys that hold a real value rather than an environment variable, and reports keys that appear twice.
Worked Example
A line //npm.myco.com/:_authToken=abc123 is flagged as a token in plain text, while ${NPM_TOKEN} is accepted.
Common Uses
- Reviewing project setup.
- Fixing install errors.
- Security checks before a commit.
- Teaching npm.
Tips and Common Mistakes
- Keep user tokens in your home .npmrc, not in the project.
- Use environment variables in CI.
- Run npm config list to see what npm really uses.
- Check the first result against a case you already know, so you can trust the tool for the rest.
- Nothing you type leaves your device. The work is done by your browser, so it also works with a slow connection once the page has loaded.
Related Tools
Next, you may need the package.json validator, query string parser, JSON formatter and validator, CSV and JSON converter.
Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.
Frequently Asked Questions
Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.