0

I follow the instruction https://pnp.github.io/sp-dev-fx-property-controls/controls/PropertyFieldPeoplePicker/ and setup target audience in React without any issue but it is not working for No JS JS Framework web part. I am getting Failed to load component error. I tried using different version for @pnp/spfx-property-controls in No framework (1.16, 3.8.0-3.11.0) with no luck. Any idea ?

I was expecting to see Target audience working in No JS Framework.

Yon
  • 3
  • 3

1 Answers1

0

Looks like currently there are some compatibility issues between the latest version of the spfx-property-controls library and the latest version of the SPFx framework that result in the problem you observe. What you could try to do is to use versions that are known to be compatible (previous ones):

  • Not working: SPFx 1.16.1 + SPFx property controls 3.11.0.
  • Working: SPFx 1.15.2 + SPFX property controls 3.10.0

Please note that even if you don't include react explicitly in your package.json, it is included anyway by the property controls library because the library is using react under the hood to render the picker component. The problem you see appears to be related to the recently added support of react version 17.

Nikolay
  • 10,752
  • 2
  • 23
  • 51
  • Thanks Nikolay for your response. well that is discouraging. I will see if i can be able to test it using 1.15.2. – Yon Jan 20 '23 at 17:53
  • Technically should be easy to do: you replace every "1.16.1" with "1.15.2" in the package.json and then do a clean install (remove the lock file and node_modules) – Nikolay Jan 20 '23 at 18:29