Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error getting when try to installing font awesome free

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?

like image 709
Samanthika Rajapaksa Avatar asked Sep 06 '25 21:09

Samanthika Rajapaksa


1 Answers

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

like image 154
Pawara Siriwardhane Avatar answered Sep 09 '25 15:09

Pawara Siriwardhane