maafk
maafk

Reputation: 6876

How do I modify the configuration of Yarn?

In npm I can run

npm config set cafile "path/to/my/cert.pem"

Can you do something similar with Facebook's yarn?

When I run yarn -h, I don't see any options for setting any kind of configuration.

Am I missing something?

Upvotes: 7

Views: 16544

Answers (2)

Tushar Pandey
Tushar Pandey

Reputation: 4857

as we are using yarn4 we can use ( copied from above comment ) :

yarn config set httpsCertFilePath "path/to/cert.pem"

to disable strict ssl

yarn config set enableStrictSsl false

Upvotes: 0

Jamie Ferguson
Jamie Ferguson

Reputation: 96

You can use the same syntax to set a config value in yarn:

yarn config set cafile "path/to/my/cert.pem"

Although, if you have this set in your npm config already, it should fall through and use what has been set there. You could therefore have different cafile config values for yarn and npm.

If you run yarn help you'll see all the yarn commands. Running yarn -h is currently the same as running yarn install help, hence why you don't see the config or any other commands. There is an open feature request to make yarn -h and yarn --help equivalent to yarn help as it is in npm.

Upvotes: 8

Related Questions