Describe the bug
For yarn 2 there is a new config format, .yarnrc.yml
(https://next.yarnpkg.com/configuration/yarnrc),
To Reproduce
Install yarn 2.
Expected behavior
Include what you have to insert in your config file in the docs.
Bug report checklist
I got stuck on the scope name since it has an @ sign in it. After searching around I found out that you can just drop it from the scope name. Here is what I added to my .yarnrc.yml
to get it to authenticate properly:
```yml
npmRegistries:
//npm.fontawesome.com:
npmAlwaysAuth: true
npmAuthToken: "YOUR-TOKEN"
npmScopes:
fortawesome:
npmRegistryServer: https://npm.fontawesome.com/
Another valid configuration (.yarnrc.yml
):
npmScopes:
fortawesome:
npmRegistryServer: "https://npm.fontawesome.com/"
npmAlwaysAuth: true
npmAuthToken: "YOUR-TOKEN"
@shawnheide @PutziSan thanks for the heads-up
Quoting from: https://next.yarnpkg.com/configuration/yarnrc
Environment variables can be accessed from setting definitions by using the ${NAME} syntax when defining the values. By default Yarn will require the variables to be present, but this can be turned off by using either ${NAME-fallback} (which will return fallback if NAME isn't set) or ${NAME:-fallback} (which will return fallback if NAME isn't set, or is an empty string).
Did anyone test with an environment variable instead of hard-coding the token in the configuration?
Most helpful comment
I got stuck on the scope name since it has an @ sign in it. After searching around I found out that you can just drop it from the scope name. Here is what I added to my
.yarnrc.yml
to get it to authenticate properly:```yml
npmRegistries:
//npm.fontawesome.com:
npmAlwaysAuth: true
npmAuthToken: "YOUR-TOKEN"
npmScopes:
fortawesome:
npmRegistryServer: https://npm.fontawesome.com/