1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 15:18:01 +00:00

Add Turn Off npm Funding Message as a JavaScript TIL

This commit is contained in:
jbranchaud
2024-02-21 13:18:51 -06:00
parent 57eb2d73ae
commit 5a3ef11820
2 changed files with 31 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
_1372 TILs and counting..._
_1373 TILs and counting..._
---
@@ -497,6 +497,7 @@ _1372 TILs and counting..._
- [Truthiness of Integer Arrays](javascript/truthiness-of-integer-arrays.md)
- [Turn An HTMLCollection Into An Array](javascript/turn-an-html-collection-into-an-array.md)
- [Turn Off Console Error Messages In A Test](javascript/turn-off-console-error-messages-in-a-test.md)
- [Turn Off npm Funding Message](javascript/turn-off-npm-funding-message.md)
- [Waiting On Multiple Promises](javascript/waiting-on-multiple-promises.md)
- [Who Am I: NPM Edition](javascript/who-am-i-npm-edition.md)
- [Write A JavaScript Object To A JSON File](javascript/write-a-javascript-object-to-a-json-file.md)

View File

@@ -0,0 +1,29 @@
# Turn Off npm Funding Message
When you run `npm install`, you'll see a few different details output to your
terminal. One you are probably used to seeing is the one about packages looking
for funding.
```bash
npm install
up to date, audited 253 packages in 2s
88 packages are looking for funding
run `npm fund` for details
6 vulnerabilities (1 low, 4 moderate, 1 high)
```
If for whatever reason you need to turn off this (e.g. for scripting and CI
purposes), you can globally configure it with the `npm config` command.
```bash
npm config set fund false --location=global
```
Run an `npm install` again and the funding message will no longer show.
This edits the `npmrc` located in the `/etc` directory of wherever your current
version of Node is installed. Running `npm config edit --global` will open you
up to this file as well.