Sp-dev-docs: SPFx Extensions not working on SharePoint 2019 On Prem - 500 error

Created on 19 Feb 2019  ·  7Comments  ·  Source: SharePoint/sp-dev-docs

Category

  • [ ] Question
  • [ ] Typo
  • [x] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

Using the latest version of the @microsoft/generator-sharepoint, the targeted framework when you select the choice to support SharePoint 2019 and above is to get Framework version 1.4.1 and when you create and deploy an extension, it will work in the target on premises SP 2019 site.

Observed Behavior

No extensions created with the scaffolder appears to work but when bringing a recent extension create that appears to target framework 1.4.0 it works (e.g. tutorial sample direct from GitHub)

Steps to Reproduce

1) Get the latest (as of Feb 19 2019) version of the Scaffolder (the one targeting framework 1.7.1)
2) Follow all steps (as per the tutorial, for example) to create a SPFx extension
3) Follow all steps to allow SPFx to be installed on your on Premises SP 2019 Web Application/Site Collection
4) Follow the tutorial steps to deploy, by hand, the extension package
5) Go to a site to view the extension and see that it does not "load" while confirming via the console that there is an error loading the extension code.

docs spfx-general bug-suspected

All 7 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

A fix! (manual) … change the targeted framework (package.json setting) to point to 1.4.0 like the working example and redeploy … it works. The bug, if it is still that, is to update the scaffolder to point to 1.4.0 (just like its react should point to 15 not 16 for on prem) OR a fix in SP 2019 to "accept" 1.4.1. Suggesting that the documentation make note of this until it is resolved thanks!

Noting this under Dev Docs as documentation would have been expected to note this piece. Let me know and I will move it elsewhere as a bug. Thanks.

Thanks AC!

This was actually addressed in v1.8.0 as it now adds the correct SPFx underlying versions to the package.json.

Excellent, thanks AC!

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

Was this page helpful?
0 / 5 - 0 ratings