Workbench url is not coming up

sns 9,246 Reputation points
2022-05-12T18:14:02.77+00:00

Workbench url is not coming up , I have genated the hello world web part
but below errors:
201526-capture.png

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

Accepted answer
  1. Tong Zhang_MSFT 9,251 Reputation points
    2022-05-13T09:15:50.09+00:00

    Hi @sns ,

    Based on my research , as a troubleshooting please try to do the following test or operation:

    1. Please try to using http instead of https, you can set "https": false in config\serve.json ,and remove the "s" from the URL in the "initialPage" (as shown in the screenshot),then save the file and restart "gulp serve".
      201689-image.png
    2. Please check the version of node and npm you are using.

    Similar issues:
    https://sharepoint.stackexchange.com/questions/230113/spfx-webpart-workbench-on-localhost-is-not-connecting

    More information about Create Web Part With SharePoint Framework (SPFx):
    https://www.c-sharpcorner.com/article/create-web-part-with-sharepoint-frameworkspfx/

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.



1 additional answer

Sort by: Most helpful
  1. Rob Windsor 2,001 Reputation points
    2022-05-16T11:23:58.61+00:00

    There have been a couple major changes in the last few versions of the SharePoint Framework that you should be aware of.

    Local workbench:
    The local workbench was removed in SPFx v1.13.0. Web parts are now tested exclusively in the hosted workbench. See SharePoint Framework v1.13 release notes | Deprecations and removed items in this release for more information.

    Gulp and Gulp CLI
    Prior to the release of SharePoint Framework v1.13.1, Microsoft's guidance was to install Gulp globally. Around the time of the release of SharePoint Framework v1.13.1, that guidance changed to installing Gulp CLI globally. Doing so enables you to have some projects that use Gulp v3 and other projects that use Gulp v4.

    You can check to see if you have Gulp installed globally by opening a command prompt and running npm list --depth=1 -g gulp. If you get a result, you should uninstall Gulp and then reinstall Gulp CLI.

    Other notes
    The recent versions of the SharePoint Framework work with Node.js v12.13.0+, v14.15.0+. The SharePoint Framework does not work with Node.js v16.x. You can check which version of Node.js you have installed by opening a command prompt and running node -v.

    I hope this helps.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.