I faced the following error today when logging in Salesforce Dev Hub using the CLI.
'EACCES': listen EACCES 127.0.0.1:1717
And what I did to get over it was to change that default port 1717 to something else.
The steps are as below.
- Open a
Command Promptwindow. - Go to a folder in your local machine using
cdcommand. For example, in my case:cd Samples\Salesforce\my_sfdx_project - Create a Salesforce DX project using
sfdx force:project:createcommand. In my case:sfdx force:project:create -n force-proj01 - In the newly created folder
force-proj01, opensfdx-project.jsonfile and add following line:"oauthLocalPort": "7717",.
The file will eventually contain:
- Log in using the command
sfdx force:auth:web:login -d -a DevHub. Now the browser window can open up. Fill in your user name and password to log in. - The browser now will redirect to such a link as
http://localhost:1717/OauthRedirect?code=..., which is not existing. - Change the port in the link above from
1717to7717and press Enter. - Now I can log in to Dev Hub successfully.
