New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the documentation on the new .yarnrc.yml format for pro users #16156
Comments
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 npmRegistries:
//npm.fontawesome.com:
npmAlwaysAuth: true
npmAuthToken: "YOUR-TOKEN"
npmScopes:
fortawesome:
npmRegistryServer: https://npm.fontawesome.com/ |
Another valid configuration ( 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
Did anyone test with an environment variable instead of hard-coding the token in the configuration? |
Hi, there is a typo in the package name (foRtawesome-pro) scope: foRtawesome in the scope is not a typo 😅 PS: I've just tried
with the following npmScopes:
fortawesome:
npmRegistryServer: "https://npm.fontawesome.com/"
npmAlwaysAuth: true
npmAuthToken: ${FONT_AWESOME_AUTH_TOKEN} So I can confirm that yarn@berry v2.4.3 fetches the token from the environment Without a fallback, the above configuration throws an error if the token is not found, so it will be easy to debug @robmadole I think that is safe to add the above snippet to the instructions for Yarn 2 |
Well, do I feel like an idiot now 😅 |
This really should be on the Docs page. |
I can confirm npmScopes:
fortawesome:
npmAlwaysAuth: true
npmAuthToken: "${FONT_AWESOME_AUTH_TOKEN}"
npmRegistryServer: "https://npm.fontawesome.com/" Also works on yarn 3.2 |
Having trouble authenticating.. where are you setting your environment variable?
|
Hi
I fill npmAuthToken with my token. but when I want to install @fortawesome/fontawesome-pro I get below error:
|
Can you please try You should see something like
|
Here is my
|
@tagliala What is wrong with it? |
also having the same issue, with both Yarn 3.x and trying to resolve using NPM |
I had the same issue, yarn version 3.6.1 for me hardcoding npmAuthToken haven't worked however somehow using environment variable worked "${FONT_AWESOME_AUTH_TOKEN}" so there is some problem with with yarn config itself Then i decided to follow yarn instruction here and adjusted values accordingly by running following commands yarn config set initScope npmScopes
yarn config set npmScopes.fortawesome.npmRegistryServer https://npm.fontawesome.com/
yarn config set npmScopes.fortawesome.npmAlwaysAuth true
yarn config set npmScopes.fortawesome.npmAuthToken XXXXX-XXX.... This updated yarn config similar to provided in documentation with exception of one more extra line initScope: npmScopes Somehow this line was critical to make it work with hardcoded token |
Had to install via |
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
The text was updated successfully, but these errors were encountered: