question

sns1 avatar image
0 Votes"
sns1 asked TongZhangMSFT-7548 commented

Workbench url is not coming up

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


office-sharepoint-onlinesharepoint-dev
capture.png (5.7 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @sns1,

I am currently doing some research on this issue, will let you know as soon as possible.

0 Votes 0 ·
TongZhangMSFT-7548 avatar image
0 Votes"
TongZhangMSFT-7548 answered TongZhangMSFT-7548 commented

Hi @sns1,

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.





image.png (13.8 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi TongZhang,

I tried all the steps but new err\ror when I execute gulp serve. PFA.
201759-gulpserveerror.png


0 Votes 0 ·
gulpserveerror.png (34.7 KiB)

Hi @sns1,

Please check the version of node and Gulp you are using .If you're using Node.js v12+ or higher, you need use Gulp v4+. If you're using a version of Node.js lower than v12, you must use Gulp v3.You can update the version of Gulp to solved this issue.

More information for reference:
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment

0 Votes 0 ·

Hi @sns1,

I am checking to see if the problem has been resolved. If you have any questions or progress, you can contact me in time.

1 Vote 1 ·
RobWindsor-4651 avatar image
0 Votes"
RobWindsor-4651 answered RobWindsor-4651 edited

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.





5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.