Home > Back-end >  npm install unable to authenticate at incorrect url
npm install unable to authenticate at incorrect url

Time:02-22

When I run npm install @types/js-cookie@^2.2.0 I get this error:

npm install @types/js-cookie@^2.2.0

npm ERR! code E401 npm ERR! Unable to authenticate, need: Basic realm="https://pkgsprodsu3weu.app.pkgs.visualstudio.com/"

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\A183540\Me\Roaming\npm-cache_logs\2022-02-18T09_16_35_272Z-debug.log

I'm not sure why it's trying to access https://pkgsprodsu3weu.app.pkgs.visualstudio.com/ as my .npmrc is this:

; begin auth token
//avdigitalweb.pkgs.visualstudio.com/_packaging/MeDigital.NPM/npm/registry/:[email protected]
//avdigitalweb.pkgs.visualstudio.com/_packaging/MeDigital.NPM/npm/registry/:_password="token"
//avdigitalweb.pkgs.visualstudio.com/_packaging/MeDigital.NPM/npm/registry/:[email protected]
//avdigitalweb.pkgs.visualstudio.com/_packaging/MeDigital.NPM/npm/:[email protected]
//avdigitalweb.pkgs.visualstudio.com/_packaging/MeDigital.NPM/npm/:_password="token"
//avdigitalweb.pkgs.visualstudio.com/_packaging/MeDigital.NPM/npm/:[email protected]
//avdigitalweb.pkgs.visualstudio.com/_packaging/MeDigital.NPM/npm/registry/:always-auth=true
; end auth token

I'm unsure where https://pkgsprodsu3weu.app.pkgs.visualstudio.com/ is coming from so can't update it and also keep getting directed to this but I'm unable to install any packages, therefore can't install vsts-npm-auth. Is there any other way this can be resolved?

CodePudding user response:

I regenerated the AzureDevOps token.

  • Related