Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I modify the configuration of Yarn?

Tags:

npm

yarnpkg

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?

like image 452
maafk Avatar asked Mar 11 '23 22:03

maafk


1 Answers

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.

like image 92
Jamie Ferguson Avatar answered Mar 29 '23 01:03

Jamie Ferguson