azurenpmcontinuous-integrationazure-devopsfont-awesome-5

fontawesome pro in azure devops


Has anyone been able to get CI builds working with fontawesome pro? Locally my build and fontawesome pro works because I've run these commands

npm config set "@fortawesome:registry" https://npm.fontawesome.com/ && \
npm config set "//npm.fontawesome.com/:_authToken"

However my CI build fails with the message

npm ERR! 404 Not Found: @fortawesome/fontawesome-pro@5.7.1

I've tried setting a .npmrc file but it didn't help. I also tried adding fontawesome's repo in service connections.


Solution

  • You should set the npm config to project level, by adding a .npmrc in the same folder as package.json

    The contents of the .npmrc should be

    @fortawesome:registry=https://npm.fontawesome.com/
    //npm.fontawesome.com/:_authToken={your token}