we are unable to add web-part in workbench.aspx on premise SharePoint 2019

Mohammad Javed 151 Reputation points
2020-11-02T13:25:56.48+00:00

we are unable to add web-part in workbench.aspx on premise SharePoint 201936829-screenshot.png

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,365 questions
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,619 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ravi Thapliyal 77 Reputation points
    2020-11-09T09:02:23.083+00:00

    Javed,

    1. You need to downgrade the Node.Js version to 8.x version
    2. Use SharePointFx version 1.4.0 and check dependcies set to following in package.json
      "@microsoft/sp-core-library": "~1.4.0",
      "@microsoft/sp-webpart-base": "~1.4.0",
      "@microsoft/sp-lodash-subset": "~1.4.0",
      "@microsoft/sp-office-ui-fabric-core": "~1.4.0"
    3. While creating solution use - SharePoint 2019 On Premises
    4. Make sure that your SharePoint 2019 On Premise - default wesbites is running on Port no 80 only

    I hope it will work :)

    Ravi Thapliyal

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Jerryzy 10,571 Reputation points
    2020-11-03T02:05:44.853+00:00

    Hi @Mohammad Javed ,

    SharePoint 2019 needs to use SPFX v1.4.0, please check if you have specified the valid version in package.json:

    36918-02.png

    And before adding web part in workbench.aspx, make sure have executed "gulp serve".

    Here is a demo to build and deploy SPFX Web Part in SharePoint 2019 environment, please check to see if missing some steps:

    SPFx With SharePoint 2019


    If an Answer 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.


  2. sadomovalex 3,631 Reputation points
    2020-11-03T14:22:16.07+00:00

    is "gulp serve" running when you try to access Sharepoint workbench?
    did you run "gulp trust-dev-cert" before to run "gulp serve"? (it is needed for trusting self-signed developer certificate: Build your first SharePoint client-side web part)


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.