+ Start a Discussion
anil Kumaranil Kumar 

ERROR running force:auth:web:login:  Cannot read property 'getInstance' of undefined

Hi All,

While doing authorize an org i am getting below error. Please help me how to resolve this error.

ERROR running force:auth:web:login:  Cannot read property 'getInstance' of undefined

Anil Kumar 
ShirishaShirisha (Salesforce Developers) 
Hi Anil,


Can you please share the complete command which you are using to authorize the org.

If you are using the below syntax to login by providing the instance url then make sure you are using the instance url which belongs to your org.

$ sfdx force:auth:web:login -r https://test.salesforce.com

If you have used instance instead of test.salesorce.com or login.salesforce.com then I would suggest you to get the correct instance from company information.


Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri