sp-dev-fx-controls-react: SPFx 1.12 error with ListPicker and ListItemPicker

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

Please specify what version of the library you are using: v3 on SPFx 1.12

If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.

Expected / Desired Behavior

gulp serve builds the Web Part.

Observed Behavior

I am having issues with the ListPicker and ListItemPicker components. When I run gulp serve, I am getting the following errors:

Error - [webpack] 'dist':
./node_modules/@microsoft/decorators/lib-commonjs/index.js
Module not found: Error: Can't resolve './override' in 'C:\MyGit\React-PPP-PnP\node_modules\@microsoft\decorators\lib-commonjs'

If I run gulp build, Iam not getting any error.

PeoplePicker works fine.

Steps to Reproduce

Create a Web Part using the following configuration: SPFx 1.12 Nodejs 10.24.0 TypeScript 3.7

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 37 (22 by maintainers)

Most upvoted comments

@brianpmccullough - as soon as we fix #918 😃

@PathToSharePoint it was mostly a joke from my side. But if you import just from @pnp/spfx-controls-react you will drastically increase the size of your web part, as you will include ALL the controls and all dependencies, like PnPJS.

@DennisKuhn, @PathToSharePoint Hmmm… everything works for me. Here is my sample. It uses node 14.17.0, SPFx 1.12.1 and controls 3.1.0.

Please check it out.

Yes, the change will be included in the next release.

My team is reporting that the beta version is working now without throwing the bundle errors that we reported. Should we look for this in an upcoming release to the controls?

Hi I am trying Nodejs v14.16, SPFx 1.12.1, @pnp/spfx-controls-react 3.1.0 and rushstack-3.9. I seem to have the same issue with the @microsoft/decorators . The problem occurs to me when I try to use ListView .

Speaking of small differences, I am also building the solutions on Nodejs v14, which is supported by SPFx 1.12.1. No idea if that matters either, and here too I’d be interested in testimonies from people who have successfully run such configuration.

What I just meant is that I am using the JSX (JavaScript Extensions) language with React. I do use TypeScript too, and so my files have a tsx file extension, not ts. It probably doesn’t matter, I am just trying to find any small difference that could impact my build.

I’ll publish my sample this month. It works great, it’s just that I had to run npm install @microsoft/decorators.

@PathToSharePoint - here is the branch for SPFx 1.12.1. Currently it uses rc1 version.

I tested it with npm link and it works both in debug and release.

If you want to test it out - pull the branch locally and npm link it to you sample.

I think with all the issues with SPFx 1.12 and the fact it’s deprecated, it is probably the problem.