Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

npm is unable to authenticate when attempting to run npm install in my project folder #7598

Closed
noahlthorne opened this issue Jun 16, 2024 · 2 comments

Comments

@noahlthorne
Copy link

I have been having a consistent problem with npm being unable to authenticate when I try to run npm install in my project folder. I have tried many different solutions according to information I found on the internet. Here are the things I tried

  • npm logout and then npm login
  • removing the .npmrc folder from both my home directory and project directory then recreating it on login
  • changing node version
  • uninstalling and reinstalling node
  • manually adding authentication token to .npmrc file
  • clearing the cache using npm cache clean --force
  • checking the proxy setting
  • removing the proxy

None of these methods worked for me. I think at this point I have exhausted all of my options, which is why I am reaching out to npm support.

Additionally, when I run npm config get registry I get: https://registry.npmjs.org/

Also, when I run "npm config get userconfig" it returns "/home/noahlthorne/.npmrc" which is the correct file where the auth token is located

Here is the most recent error log when running npm install:

npm i
npm error code E401
npm error Unable to authenticate, your authentication token seems to be invalid.
npm error To correct this please try logging in again with:
npm error npm login
npm error A complete log of this run can be found in: /home/noahlthorne/.npm/_logs/2024-06-13T13_22_29_575Z-debug-0.log

@milaninfy
Copy link
Contributor

@noahlthorne Could you please provide steps to reproduce with these information

Environment Details

  • npm:
  • Node.js:
  • OS Name:
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here

@milaninfy
Copy link
Contributor

Closing due to age. If this is still a problem please feel free to reopen this issue, or create a new issue w/ steps to reproduce and logs.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants