I have get below error
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="https://npm.fontawesome.com/",service="npm.fontawesome.com"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Samanthika\AppData\Roaming\npm-cache\_logs\2021-09-11T23_51_19_635Z-debug.log
In previous project I have mistakenly do the global configuration using below commands
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" TOKEN
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=TOKEN
I cannot install fontawesome to my new projects after do the global config bacause it gives same error. How I solve this problem?
First, run the following command to delete the old registry.
npm config delete "@fortawesome:registry" https://npm.fontawesome.com/
Then install the required package to your project
npm install / npm install "package name"
This should solve your problem
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