How do you add a comment to .npmrc?

426 Views Asked by At

My .npmrc looks like this:

node-options=--openssl-legacy-provider

I want it to look like this:

COMMENT the following line is needed for node 18 or higher
node-options=--openssl-legacy-provider

How do you add a comment in .npmrc?

1

There are 1 best solutions below

0
On BEST ANSWER

Lines in .npmrc files are interpreted as comments when they begin with a ; or # character.

https://docs.npmjs.com/cli/v9/configuring-npm/npmrc#comments