SPFX unreserve ports Node.js

asked 2021-04-26T07:40:59.127+00:00
g h 716 Reputation points

I am using SharePoint framework webpart and the default port for workbench is 4321, for another webpart developing the port is reserved and the workbench page is cant reach, I changed the port to 4322 for example, but how we can unreserved the default port?

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,344 questions
No comments
{count} votes

Accepted answer
  1. answered 2021-04-27T01:58:49.17+00:00
    Jerryzy 10,296 Reputation points

    Hi @g h ,

    The port for SPFX WebPart is denified in config->serve.json, you can change to the default port there:

      "$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",  
      "port": 4321,  
      "https": true,  
      "initialPage": "https://localhost:5432/workbench",  
      "api": {  
        "port": 5432,  
        "entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/"  


    Best Regards

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    No comments

0 additional answers

Sort by: Most helpful