+ Start a Discussion

Unable to create a Lightning web Component

When I'm trying to follow the trailhead to create Lightning web component, I'm stuck at step 2.

In the 1st course, we have to install Salesforce CLI and VS Studio tools which is done.

In the 2nd course, where a new project has to be added is also done. But after that, when I try to Authorize an org or setup a default org, it gives me the below error:

Starting SFDX: Authorize an Org
16:19:16.79 sfdx force:auth:web:login --setalias MyDevOrg --instanceurl https://test.salesforce.com --setdefaultusername
ERROR running force:auth:web:login: Cannot start the OAuth redirect server on port PortInUseAction.
Try this:
Kill the process running on port 7717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file.
16:21:02.884 sfdx force:auth:web:login --setalias MyDevOrg --instanceurl https://test.salesforce.com --setdefaultusername ended with exit code 1

I have tried to  search the process with the port number - 7717 and tried to kill that process, but that doesn't work either.

Any help on this will be appreciated.

Khan AnasKhan Anas (Salesforce Developers) 
Hi Anketha,

Greetings to you!

Try restarting your computer.

Please refer to the below links which might help you further with the above issue.



I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas

same issue to me, even i tried all https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_troubleshoot_cancel_auth.htm

then not worked for me, so i reinstalled the vsc and installed the plugin and its worked perfectly. but not sure this as the solution, but worth to retry to install and check it.