Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm login not allowing login to github

When I try to run the following in the terminal it should ask me for username and password but nothing comes up other than the error bellow.

npm login --registry=https://npm.pkg.github.com --scope=@Psychedelic

npm notice Log in on https://npm.pkg.github.com/
npm ERR! code ENYI
npm ERR! Web login not supported`

Any ideas?

I think i might need to create a ~/.npmrc file with token etc but can't work out how to do that.

like image 273
StackGod Avatar asked Sep 13 '25 15:09

StackGod


1 Answers

If you use npm version 9, you should add the argument --auth-type=legacy with npm adduser or npm login. Otherwise, you will get error npm ERR! Web login not supported.

like image 68
Ruslan D. Avatar answered Sep 16 '25 07:09

Ruslan D.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!