sharepoint-onlinespfxpnp-js

Which versions of SPFx, PnPjs, and @pnp/spfx-controls-react should be used together?


I am working on a SharePoint Framework (SPFx) project and I'm having trouble determining the correct versions of SPFx, PnPjs, and @pnp/spfx-controls-react to use together. Specifically, fir the following components:

SPFx 1.19 and SPFx 1.17 PnPjs v2, v3, and v4 @pnp/spfx-controls-react package

I found some documentation suggesting that PnPjs v3 & @pnp/spfx-controls-react is supported with SPFx 1.19 1.17, but I am struggling to find clear guidelines on which versions of these libraries work well together. In particular, I am looking for information on how to use components like PeoplePicker and FilePicker in this context.

Could someone provide guidance or point me to the relevant documentation that explains:

The compatibility between different versions of SPFx and PnPjs. Which version of @pnp/spfx-controls-react should be used with specific versions of SPFx and PnPjs. Any example configurations or best practices for using PeoplePicker and FilePicker with these libraries. Any help or references to the appropriate documentation would be greatly appreciated!


Solution

  • For PnPjs, the dependencies are listed on the following page: https://pnp.github.io/pnpjs/getting-started/#spfx-version-1180-later

    Specifically for your question, SPFx 1.17 can only use PnPjs v3 becuase v4 needs Node 18, which is not supported by SPFx 1.17. SPFx 1.19 can use either version of PnPjs, but v4 is recommended.

    For the PnP/React Controls, dependencies are found here: https://pnp.github.io/sp-dev-fx-controls-react/#library-versions

    For your question, the latest version of the controls support both SPFx 1.17 and 1.19

    Good luck!
    Don


    If my answer helps solve or resolve your issue, please consider clicking Mark as Best Response & Like. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it a Like.