I am trying to run a job with a Node.js project. One of the steps is rtnpminstall
which runs the npm install
command. The rtnpminstall
command is run by the Artifactory plugin on Jenkins. The error says.
npm ERR! code E403
npm ERR! 403 403 Forbidden - GET
https://<artifactoryurl>/artifactory/api/npm/<npm registry>/<dependency name>
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.
But when I run using npm install -g
, it works fine.
When I can click on the dependency link in the jenkins job log, it downloads fine.
I am trying to see what could be the issue as we do not want to use -g option.
My guess is there night be no write permission on project folder on jenkins agent.