As per fontawesome's documentation I am trying to install pro version of fontawesome 5. I have created a .npmrc file where licence and registry have been mentioned.
Now I am trying to run npm install --save-dev @fortawesome/fontawesome-pro. It is throwing error Bearer token value is not a legal HTTP header value. I have attached a snapshot for the same.
Adding folder structure:
Thanks
The message can be a bit misleading. This error can occur if your token is very old (I've had this happen a few times myself)
Try to regenerate your _auth_token
from the fontawesome page:
If you don't mind a global token (if you do not work with several licenses), you can enable the Pro license globally like so:
#: npm config set "@fortawesome:registry" https://npm.fontawesome.com/
#: npm config set "//npm.fontawesome.com/:_authToken" TOKEN_GOES_HERE
If you work with for instance docker containers, a better solution is to set environment variables like so:
#: FONTAWESOME_NPM_AUTH_TOKEN=YOUR_TOKEN_GOES_HERE npm install --save @fortawesome/fontawesome-pro
or set the .npmrc
file with:
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=${FONTAWESOME_NPM_AUTH_TOKEN}
But try to regenerate the token and re-run your commands.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With