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
Priya MishraPriya Mishra 

how to autherise vs code

Hi All,

While autherise the org in Visual studio code i am faicng this error can you pleae help me to resolve this error.

i have insatalled CLI and set the envirnment variable.
insatlled salesforce extension pack as well but still not able to autherise with the below error.

error:


{ Error: spawn cmd ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn cmd',
  path: 'cmd',
  spawnargs:
   [ '/c',
     'start',
     '""',
     '/b',
     'login.salesforce.com/services/oauth2/authorize?response_type=code^&client_id=PlatformCLI^&redirect_uri=http%3A%2F%2Flocalhost%3A1717%2FOauthRedirect^&state=9e27549e3106^&prompt=login^&scope=refresh_token%20api%20web^&code_challenge=REjVPthgj4hOKjTa7-qA4rKI7FnBThJ4cC26UdmoYI4' ] }
SwethaSwetha (Salesforce Developers) 
HI Priya,
The issue you are facing seems similar to https://salesforce.stackexchange.com/questions/249855/salesforce-dx-enoent-error-when-trying-to-login

Please ensure you have appropriate path setup in environment variables
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Priya MishraPriya Mishra
Hi Sweath thanks forthe reply to my question but still i am facing the same issue i have modified envirnment variable as well.
 i am not sure what ejactly issue which causing this error.