Skip to content
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

401 unauthorized downloading svg-core in the cloud w/ free version #545

Open
bradherman opened this issue Mar 7, 2023 · 1 comment
Open

Comments

@bradherman
Copy link

Describe the bug

When deploying our site to Cloudflare, we're now seeing a 401 error with the fontawesome-svg-core download.

error An unexpected error occurred: "https://npm.fontawesome.com/@fortawesome/fontawesome-svg-core/-/6.2.0/fontawesome-svg-core-6.2.0.tgz: Request failed \"401 Unauthorized\"".

Reproducible test case

Not sure how to show a test case for this without deploying to Cloudflare.

Expected behavior

This uses the free fontawesome package and therefore shouldn't need any auth token

Desktop (please complete the following information):

  • Browser [e.g. chrome, safari] - n/a
  • Versions:
"@fortawesome/fontawesome-free": "6.2.0",
"@fortawesome/fontawesome-svg-core": "6.2.0",
"@fortawesome/free-regular-svg-icons": "6.2.0",
"@fortawesome/free-solid-svg-icons": "6.2.0",

Additional context

Using yarn

@svondervoort
Copy link

svondervoort commented Mar 15, 2023

Finally found out what the issue was for me.

Check your yarn.lock and look for npm.fortawsome.com if it is in the yarn.lock you probably have set up a global NPM config token like this:

npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" FONT-AWESOME-PACKAGE-FONT-AWESOME-PACKAGE-TOKEN

Replace set with rm to remove those entries from the npm config, do a yarn remove %package% to uninstall all those font-awesome related packages and install them again. Now it should be something like this in the yarn.lock for the font-awesome packages: "https://registry.yarnpkg.com/@fortawesome/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants