Dimitri Kopriwa
Dimitri Kopriwa

Reputation: 14363

Can't authenticate to npm.fontawesome.com registry to install pro packages

I have configured my host globally as described in font awesome documentation

I am running the following:

npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" "${NPM_FONT_AWESOME_AUTH_TOKEN}"

I have the following error:

npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="https://npm.fontawesome.com/"

I expect to authenticate.

If you access from a browser https://npm.fontawesome.com/ , you have a Basic auth, I am not sure what I should expect here as I have never tried before.

This happened recently, the configuration was working for year. Is it me or fontawesome server?

How to fix fontawesome npm authentication?

Upvotes: 17

Views: 29937

Answers (3)

sweetnandha cse
sweetnandha cse

Reputation: 961

I am also got this same error!.. Below mentioned steps working for me...

Solutions

Step 1 : npm config delete "@fortawesome:registry" https://npm.fontawesome.com/

Step 2 : npm install / npm install <package_name>

or

otherwise add npm username & password.

Upvotes: 24

Dimitri Kopriwa
Dimitri Kopriwa

Reputation: 14363

FontAwesome does not keep your access active despite you have a license for one or more versions. The one way to get permanent access to your font awesome package is to host it on your own private registry or on a paid npm account.

Be aware that the provided files in direct download are not exactly the same as the npm package.

I advise fontawesome user to keep a copy of the distributed package to avoid checksum issue with lock files.

Upvotes: 4

Mani
Mani

Reputation: 343

npm install in windows make two files npmrc i remove that line and solve problem!

Upvotes: 1

Related Questions