function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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

If you have used instance instead of or 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