Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When using 'npm' it requires me to login to github

Problem When i try to use npm in any way, ex: npm update or npm i package it immediatly gives me a github login prompt.

What i tried using npm with i, install, and even giving it git directly git://. But none worked sadly.

I am new to Node.js. So far (2 weeks), i have been updating, installing and reinstalling dependencies without a problem. Just now this issue occured.

What i was doing before the error occured was nothing special. Just programming. Last thing i used npm for was to install discord.js npm i discord.js.

Assets:

OS: Windows 10 64bit

Node.js ver: 8.10.0

Node.js install method: via site [Gui]

The git prompt i keep getting and the error after either logging in or pressing cancel

Git login prompt enter image description here

enter image description here

like image 426
SunnBro Avatar asked Mar 25 '18 18:03

SunnBro


2 Answers

to have such a problem, it means your command is wrong. take for example you are trying to install angular cli and you omit the @ symbol login will pop like so

npm install -g angular/cli // this will trigger login pop-up
npm install -g @angular/cli // will work fine
so check your command

like image 122
Wasiu Avatar answered Oct 01 '22 07:10

Wasiu


This issue has been resolved. The problem was very simple but i couldn't figure it out at first.

So what was wrong with my issue here was that i accidently while working on my project changed a value in the "Package.json" file. This is ofcourse not intended. With that, my whole project's 'npm' command was broken where it could't work anymore.

Thank you everyone for your time.

like image 41
SunnBro Avatar answered Oct 01 '22 08:10

SunnBro