Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

4K
Visualizações
E401 - Unable to authenticate, your authentication token seems to be invalid

I tested with Azure Packages private NPM server and now want to revert back to using the standard NPM registry but when I do it complains. I have tried everything I can think of and it is blocking me from doing any work now. I'd really appreciate any help.

The error

  • npm ERR! code E401
  • npm ERR! Unable to authenticate, your authentication token seems to be invalid.
  • npm ERR! To correct this please trying logging in again with:
  • npm ERR! npm login

If I check the log it is still, somehow, trying to find packages from Azure rather than the npm registry.

The Azure URL specified below doesnt exist in any .npmrc file or package-lock file I can find!

To be clear here I want to use the default NPM registry not Azure. e.g.

32 silly fetch manifest @types/angular@https://pkgs.dev.azure.com/***/***/_packaging/***.Common.UI/npm/registry/@types/angular/-/angular-1.6.45.tgz

Steps I have taken

  • Deleted my local .npmrc file
  • Deleted .npmrc file from my user profile
  • Cleared NPM cache
  • Cleared local node_modules folder
  • npm config set registry https://registry.npmjs.org/
  • npm config set registry https://registry.npmjs.com/
  • Reinstalled node.js

In each case, running npm install still gives me the same error.

Please help!

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

.npmrc containing private repo credentials

  • I had similar error. It turned out that I've saved some credentials for private repo on .npmrc file at the root of my home folder.
  • So when I did npm install on my project, I get package-lock.json file contents appended with the private repo url. So this was the source of the error when deploying the project.
  • What I did was to temporarily remove the .npmrc, delete package-lock.json, delete node_modules and re-run npm install.
  • In my case the private repo details was not relevant for the project(so deleting .npmrc was not an issue)
over 4 years ago · Santiago Trujillo Relatório

0

Check your package.json for the node version you should be using and make sure that you are using a compatible version with nvm or something. This has been consistently the reason I have seen this error lately on my own machine.

over 4 years ago · Santiago Trujillo Relatório

0

Had similar issue, Deleting the .npmrc and then doing npm login again solved my issue, it was located in the project directory

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda