After fixing the failure from the private package not found in this link.
I am stuck at the error ```font awesome`` library not found. Below is the error message details:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@fortawesome/pro-regular-svg-icons - Not found
npm ERR! 404
npm ERR! 404 '@fortawesome/pro-regular-svg-icons@^5.15.2' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'data-qa-frontend'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/rando/.npm/_logs/2021-09-23T12_59_34_988Z-debug.log
If I add the auth_token for font awesome registry like below:
//registry.npmjs.com/:_authToken={TOKEN}
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken={TOKEN}
It fails due to a private package not being found. While removing the font-awesome registry it throws the error of font-awesome library not found.
Below is a part package.json file:
{
"name": "project-name",
"version": "0.1.0",
"private": true,
"dependencies": {
"@org/private-package": "^0.1.24",
"@fortawesome/fontawesome-pro": "^5.15.3",
"@fortawesome/fontawesome-svg-core": "^1.2.34",
"@fortawesome/pro-duotone-svg-icons": "^5.15.2",
"@fortawesome/pro-light-svg-icons": "^5.15.2",
"@fortawesome/pro-regular-svg-icons": "^5.15.2",
"@fortawesome/pro-solid-svg-icons": "^5.15.2",
"@fortawesome/react-fontawesome": "^0.1.14",
Thank you in advance. I will appreciate any help in solving this issue.
CodePudding user response:
After many trials,
I fixed this issue by following the step below:
- Modify the
.npmrc
file to have the content below:
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken={TOKEN}
- Go to the terminal and login to npm like below:
npm login
Username:
Password:
Email: (this IS public) {may email}
Logged in as {my username} on https://registry.npmjs.com/.
After this check the .npmrc file
, it should look like below:
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken={TOKEN}
//registry.npmjs.org/:_authToken=npm_{TOKEN}
- Finally run npm install at the root of your project and will complete it successfully.