1

I try to deploy a SharePoint Framework Client Webpart to SP 2016 On-Premises which has also custom js-file which should be hosted on the target SP2016 box in a assets library. What I understand from the documentation is: assign the path of the assets library in write-manifests.json like so:

"cdnBasePath": "https://sharepoint2016.test.de/SiteAssets/SPFx%20Client%20WebParts/SEM%20Activities"

I ran

gulp bundle --ship

to find related files in temp/deploy-folder. I uploaded these files to the assets library which I had configured in cdnBasePath. Then i ran

gulp package-solution --ship 

to create the package.

I added the package to the AppCatalog and then added the app to my site Collection. Which succeeds. When I then click on the app to see my web part in Action I get an error (the typicall 'Something went wrong'). From the Correlation-Id I found this entry:

Application error when access /_layouts/15/appredirect.aspx, Error=Object reference not set to an instance of an object.   
at     Microsoft.SharePoint.ApplicationPages.AppRedirectPage.ValidateAndProcessRequest()     
at Microsoft.SharePoint.ApplicationPages.AppRedirectPage.HandleRequest()     
at Microsoft.SharePoint.ApplicationPages.AppRedirectPage.OnLoad(EventArgs e)     
at System.Web.UI.Control.LoadRecursive()     
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Is there may be some other configuration missing?

When I use

gulp serve

to run the webpart on the Workbench everything works fine. I found no complete guide and no specification on how to deploy such artifacts to On-Premises.

Any hint is appreciated. With Kind regards, Ronny

  • same problem here... Did you found an solution to this? – Oskar Jun 14 '18 at 8:36
0

If it is a webpart, you don't need to enter your App (like you would a SPHA), you simply add the webpart as you normally would on a page through the Add Webpart ribbon item.

  • Hi Trevor, thanks for the quick Response. I just realized that. When I add the App to a site Collection, I can add the WebPart from the Ribbon of a page. Is it by design that this sort of Webparts are not shown in the webpart Gallery? – Ronny Dec 13 '17 at 17:31
  • I can't answer that one for sure, but since SPFx webparts aren't traditional webparts, that is likely why they don't show up in the webpart gallery. – Trevor Seward Dec 13 '17 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.