I am attempting to install Font Awesome Pro in my NextJS app, which is deployed via Vercel. However, I keep getting this error:
error An unexpected error occurred: "https://npm.fontawesome.com/@fortawesome/pro-light-svg-icons/-/5.15.4/pro-light-svg-icons-5.15.4.tgz: Request failed \"401 Unauthorized\""
Then the build exits with Error: Command "yarn install" exited with 1
Locally everything works great. I have the following in my .npmrc file:
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=NPM_RC
And then within Vercel settings I have an environmental variable with the name NPM_RC
and the value is my personal Pro-Token.
As an aside: I tried doing a global setup using my token but that returns the same error mentioned above. When I reached out to Font Awesome they said that Global setups can be hit or miss and that I should try the .npmrc
route.
I reached out to Font Awesome after giving the .npmrc route and try and still having the error. They are not sure what is going on... I am stuck and any help would be greatly appreciated. Cheers!