Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnp/spfx-controls-react ListItemAttachments control loads just 2 attachments to list item even though there is more added #1682

Closed
zarovkaHans opened this issue Oct 18, 2023 · 15 comments
Labels
status:duplicate Duplicate of another issue. See comments for reference to other issue. Duplicates typically closed. status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Milestone

Comments

@zarovkaHans
Copy link

What version of PnPjs library you are using

3.x

Minor Version Number

3.18.0

Target environment

SharePoint Framework

Additional environment details

I am creating an SPFx webpart for SharePoint Online

I have installed the following packages (relevant to this issue is just @pnp/spfx-controls-react,I guess)

"@pnp/graph": "^3.18.0",
"@pnp/sp": "^3.17.0",
"@pnp/spfx-controls-react": "3.15.0",
"formik": "^2.4.3",
"moment-timezone": "^0.5.43",
"office-ui-fabric-react": "7.185.7",
"yup": "^1.2.0"

Question/Request

I have an issue with ListItemAttachments control.

I have it in the code like this. Its in the Functional component, inside the Formik component.

import { ListItemAttachments } from "@pnp/spfx-controls-react";
const attachmentsRef = React.useRef<ListItemAttachments>(null);

<ListItemAttachments
                      ref={attachmentsRef}
// context is webpart BaseComponentContext
                      context={context}
                      listId={vrListGuid}
                      itemId={neededItem.ID || 0}
                      disabled={formMode === "View"}
                    />

I have verified during run time that all needed variables are populated with needed data.

I then have a button which submits the formik form and creates the list item on sharepoint, the code goes like this

try {
        const RequestItem: IItemAddResult = await mySp.web.lists
          .getByTitle("Visitor Registration")
          .items.add(itemDetails);
        setRequestAddUpdateSuccess(strings.requestAddedSuccess);
        if (attachmentsAllowed) {
          await attachmentsRef.current.uploadAttachments(RequestItem.data.ID);
        }
      } catch (error) {
        setRequestAddUpdateErrors([strings.requestAddedError]);
      }

Item gets successfully created, object RequestItem.data contains property ID which is populated by the new item ID.
The issue is that once the line

await attachmentsRef.current.uploadAttachments(RequestItem.data.ID); is executed all attachments but two disappear from the ListItemAttachments control and only 2 attachments are save to the item.

in console there are following errors for not loaded items

image

and when I open the url from the error I get the following (it strangely says that its using the default 'Get' method even though the error in the console says the operation is 'POST')

URL is:

https://tenantURL/sites/app-VisitorRegistration2/_api/web/lists(@listId)/items(@itemId)/AttachmentFiles/add(FileName=@fileName)?@listId=guid%275b309b8c-b40b-4c8d-99a5-7e32d9ede5c9%27&@itemId=82&@fileName=%27Baggerino_jpeg.jpg%27

error message is

<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-1, Microsoft.SharePoint.Client.ClientServiceException</m:code>
<m:message xml:lang="en-US">The HTTP method 'GET' cannot be used to access the resource 'Add'. The operation type of the resource is specified as 'Default'. Please use correct HTTP method to invoke the resource.</m:message>
</m:error>

Anyone having an idea what could be wrong please?

Thanx, Jan

@patrick-rodgers patrick-rodgers transferred this issue from pnp/pnpjs Oct 18, 2023
@ghost
Copy link

ghost commented Oct 18, 2023

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

@ghost ghost added the Needs: Triage 🔍 label Oct 18, 2023
@github-actions
Copy link

Thank you for submitting your first issue to this project.

@joelfmrodrigues
Copy link
Collaborator

Hi @zarovkaHans , this is a possible duplicate of #1644
A PR was already submitted to fix the issue and should be merged soon.

@joelfmrodrigues joelfmrodrigues added status:duplicate Duplicate of another issue. See comments for reference to other issue. Duplicates typically closed. type:bug and removed Needs: Triage 🔍 labels Oct 19, 2023
@joelfmrodrigues
Copy link
Collaborator

joelfmrodrigues commented Oct 24, 2023

@zarovkaHans The PR to resolve this is now merged and a new beta version will be published in a few minutes. Please let us know if the issue persists.

@joelfmrodrigues joelfmrodrigues added this to the 3.16.0 milestone Oct 24, 2023
@joelfmrodrigues joelfmrodrigues added the status:fixed-next-drop Issue will be fixed in upcoming release. label Oct 24, 2023
@zarovkaHans
Copy link
Author

@joelfmrodrigues

hello, thanx for info. I installed the beta release using this command

npm install @pnp/spfx-controls-react@next --save

The attachments issue now seems to be solved. Thanx for that.

But it looks like that the update has introduced a new problem which was not there before..

after installing the beta version I am getting the following warnings in gulp serve command (among others)

@ ./node_modules/@pnp/spfx-controls-react/lib/controls/peoplepicker/PeoplePickerComponent.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/controls/peoplepicker/index.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/controls/dynamicForm/dynamicField/DynamicField.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/controls/dynamicForm/dynamicField/index.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/controls/dynamicForm/DynamicForm.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/controls/dynamicForm/index.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/DynamicForm.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/index.js
 @ ./lib/webparts/visitorRequestCreationForm/components/RequestForm/RequestForm.js
 @ ./lib/webparts/visitorRequestCreationForm/components/Router/Router.js
 @ ./lib/webparts/visitorRequestCreationForm/components/VisitorRequestCreationForm.js
 @ ./lib/webparts/visitorRequestCreationForm/VisitorRequestCreationFormWebPart.js
./node_modules/@pnp/spfx-controls-react/lib/services/PeopleSearchService.js 228:28-30
"export 'sp' was not found in '@pnp/sp'
    at HarmonyImportSpecifierDependency._getErrors (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:109:11)
    at HarmonyImportSpecifierDependency.getWarnings (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:60:15)
    at Compilation.reportDependencyErrorsAndWarnings (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/Compilation.js:1454:24)
    at D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/Compilation.js:1258:10
    at AsyncSeriesHook.eval [as callAsync] (eval at create (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at AsyncSeriesHook.lazyCompileHook (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/tapable/lib/Hook.js:154:20)
    at Compilation.finish (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/Compilation.js:1253:28)
    at D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/Compiler.js:672:17
    at eval (eval at create (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)   
    at D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/Compilation.js:1185:12

and this causes PeoplePicker Component to fail in my form and whole form is not loaded.

the code seems to break in the file

Solutions\WebParts\Request_Creation_Form\node_modules@pnp\spfx-controls-react\lib\services\PeopleSearchService.js

at this point

function SPPeopleSearchService(context) {
        this.context = context;
        this.cachedPersonas = {};
        this.cachedLocalUsers = {};
        this.cachedLocalUsers[this.context.pageContext.web.absoluteUrl] = [];
        // this fails with error in the console (cannot read property 'setup' of undefined reading). sp object is just undefined
        sp.setup({ pageContext: this.context.pageContext });
    }

If I comment out the people picker component in my code, all is fine and form loads and works normally (without needed peoplepicker control of course).

After the beta version update I have the following dependencies in package.json file

"dependencies": {
    "@microsoft/sp-core-library": "1.15.2",
    "@microsoft/sp-lodash-subset": "1.15.2",
    "@microsoft/sp-office-ui-fabric-core": "1.15.2",
    "@microsoft/sp-property-pane": "1.15.2",
    "@microsoft/sp-webpart-base": "1.15.2",
    "@pnp/graph": "^3.18.0",
    "@pnp/sp": "^3.17.0",
    "@pnp/spfx-controls-react": "^3.16.0-beta.6624416",
    "formik": "^2.4.3",
    "moment-timezone": "^0.5.43",
    "office-ui-fabric-react": "7.185.7",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "tslib": "2.3.1",
    "yup": "^1.2.0"
  },

before the update when peoplepicker was working just fine, I had this

"dependencies": {
    "@microsoft/sp-core-library": "1.15.2",
    "@microsoft/sp-lodash-subset": "1.15.2",
    "@microsoft/sp-office-ui-fabric-core": "1.15.2",
    "@microsoft/sp-property-pane": "1.15.2",
    "@microsoft/sp-webpart-base": "1.15.2",
    "@pnp/graph": "^3.18.0",
    "@pnp/sp": "^3.17.0",
    "@pnp/spfx-controls-react": "3.15.0",
    "formik": "^2.4.3",
    "moment-timezone": "^0.5.43",
    "office-ui-fabric-react": "7.185.7",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "tslib": "2.3.1",
    "yup": "^1.2.0"
  },

I really do not know what may have gone wrong.

Any idea please?

Many thanx, Jan

@zarovkaHans
Copy link
Author

@joelfmrodrigues

Just FYI, when I roll it back to

"@pnp/spfx-controls-react": "3.15.0",

all is fine and working just like before (apart from the list attachments of course)

@joelfmrodrigues
Copy link
Collaborator

Thanks for the update, will try to have a look

@zarovkaHans
Copy link
Author

@joelfmrodrigues

Hi,

I have another findings about the beta version..maybe it will help in the testing process..

I wanted to rule out the possibility that the error - described above - I was getting with new 3.16.0-beta.6624416 is somehow caused by the structure/code etc. in my current project.

So I created a brand new webpart with yo @microsoft/sharepoint command and installed only the new 3.16.0-beta.6624416 version to it. I imported the PeoplePicker like this

import {
  PeoplePicker,
  PrincipalType,
} from "@pnp/spfx-controls-react/lib/PeoplePicker";

and added the component to my react class like this

export default class HelloWorld extends React.Component<IHelloWorldProps, {}> {
  public render(): React.ReactElement<IHelloWorldProps> {
    const {
      myContext,
    } = this.props;

    return (
      <div className={styles.welcome}>
        <PeoplePicker
          disabled={false}
          context={myContext}
          personSelectionLimit={1}
          groupName={""}
          showtooltip={true}
          required={true}
          principalTypes={[PrincipalType.User]}
          resolveDelay={1000}
        />
      </div>
    );
  }
}

variable myContext holds the context of the webpart and is of type BaseComponentContext

however this is not accepted the the context property of the PeoplePicker with the following error

Type 'import("d:/MyStuff/GIT_Projects/Dev_Ops/Test_ReactControls/node_modules/@microsoft/sp-component-base/dist/index-internal").BaseComponentContext' is not assignable to type 'import("d:/MyStuff/GIT_Projects/Dev_Ops/Test_ReactControls/node_modules/@pnp/spfx-controls-react/node_modules/@microsoft/sp-component-base/dist/index-internal").BaseComponentContext'.
  Types have separate declarations of a private property '_serviceScope'.

if I roll back to

"@pnp/spfx-controls-react": "3.15.0",

all is working perfectly.

@zarovkaHans
Copy link
Author

@joelfmrodrigues

Hi again,

one more question I would have.
This list item attachments functionality is really critical for our solution together with the people picker.

Would it not be possible to include this attachments issue fix in the current 3.15.0 version where people picker also works?

Many thanx for considering this.

@michaelmaillot
Copy link
Collaborator

Hi @zarovkaHans,

I've tested the fix and it's working from my side. Below extract of my package.json file:

"dependencies": {
    "@fluentui/react": "^7.199.1",
    "@microsoft/sp-component-base": "1.17.3",
    "@microsoft/sp-core-library": "1.17.3",
    "@microsoft/sp-dialog": "1.17.3",
    "@microsoft/sp-lodash-subset": "1.17.3",
    "@microsoft/sp-office-ui-fabric-core": "1.17.3",
    "@microsoft/sp-property-pane": "1.17.3",
    "@microsoft/sp-webpart-base": "1.17.3",
    "@pnp/spfx-controls-react": "^3.16.0-beta.6643123",
  },

However, regarding the PeoplePicker issue, I met this problem if I'm working with a 1.17.4 version of SPFx. Is that your case?

@zarovkaHans
Copy link
Author

Hi @zarovkaHans,

I've tested the fix and it's working from my side. Below extract of my package.json file:

"dependencies": {
    "@fluentui/react": "^7.199.1",
    "@microsoft/sp-component-base": "1.17.3",
    "@microsoft/sp-core-library": "1.17.3",
    "@microsoft/sp-dialog": "1.17.3",
    "@microsoft/sp-lodash-subset": "1.17.3",
    "@microsoft/sp-office-ui-fabric-core": "1.17.3",
    "@microsoft/sp-property-pane": "1.17.3",
    "@microsoft/sp-webpart-base": "1.17.3",
    "@pnp/spfx-controls-react": "^3.16.0-beta.6643123",
  },

However, regarding the PeoplePicker issue, I met this problem if I'm working with a 1.17.4 version of SPFx. Is that your case?

Hello,

my SPFx version is 1.15.2

the fix for List Items Attachments issue works for me also with 3.16.0-beta.6643123 version.
The PeoplePicker does not work with this version though..

@michaelmaillot
Copy link
Collaborator

As a workaround, can you declare the myContext as any type in the PeoplePicker and see if it's working?

@zarovkaHans
Copy link
Author

zarovkaHans commented Oct 31, 2023

As a workaround, can you declare the myContext as any type in the PeoplePicker and see if it's working?

Hi,

to be honest, that was just a test to see if the people picker is working on the brand new web part with only 3.16.0-beta.6643123 of @pnp/spfx-controls-react installed.

In my current solution that really matters and the one I need to get working - see the original post and this comment #1682 (comment) - I do not have peoplepicker context problem. I have this problem when running gulp serve

@ ./node_modules/@pnp/spfx-controls-react/lib/controls/peoplepicker/PeoplePickerComponent.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/controls/peoplepicker/index.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/controls/dynamicForm/dynamicField/DynamicField.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/controls/dynamicForm/dynamicField/index.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/controls/dynamicForm/DynamicForm.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/controls/dynamicForm/index.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/DynamicForm.js
 @ ./node_modules/@pnp/spfx-controls-react/lib/index.js
 @ ./lib/webparts/visitorRequestCreationForm/components/RequestForm/RequestForm.js
 @ ./lib/webparts/visitorRequestCreationForm/components/Router/Router.js
 @ ./lib/webparts/visitorRequestCreationForm/components/VisitorRequestCreationForm.js
 @ ./lib/webparts/visitorRequestCreationForm/VisitorRequestCreationFormWebPart.js
./node_modules/@pnp/spfx-controls-react/lib/services/PeopleSearchService.js 228:28-30
"export 'sp' was not found in '@pnp/sp'
    at HarmonyImportSpecifierDependency._getErrors (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:109:11)
    at HarmonyImportSpecifierDependency.getWarnings (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:60:15)
    at Compilation.reportDependencyErrorsAndWarnings (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/Compilation.js:1454:24)
    at D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/Compilation.js:1258:10
    at AsyncSeriesHook.eval [as callAsync] (eval at create (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at AsyncSeriesHook.lazyCompileHook (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/tapable/lib/Hook.js:154:20)
    at Compilation.finish (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/Compilation.js:1253:28)
    at D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/Compiler.js:672:17
    at eval (eval at create (D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)   
    at D:/MyStuff/GIT_Projects/Dev_Ops/VisitorRequestApplication-1/Solutions/WebParts/Request_Creation_Form/node_modules/webpack/lib/Compilation.js:1185:12

This causes peoplepicker to crash the whole form - details in the comment above #1682 (comment)

here is my package.json content

{
  "name": "visitor-request-creation-web-part",
  "version": "0.0.1",
  "private": true,
  "main": "lib/index.js",
  "scripts": {
    "build": "gulp bundle",
    "clean": "gulp clean",
    "test": "gulp test"
  },
  "dependencies": {
    "@microsoft/sp-core-library": "1.15.2",
    "@microsoft/sp-lodash-subset": "1.15.2",
    "@microsoft/sp-office-ui-fabric-core": "1.15.2",
    "@microsoft/sp-property-pane": "1.15.2",
    "@microsoft/sp-webpart-base": "1.15.2",
    "@pnp/graph": "^3.18.0",
    "@pnp/sp": "^3.17.0",
    "@pnp/spfx-controls-react": "^3.16.0-beta.6624416",
    "formik": "^2.4.3",
    "moment-timezone": "^0.5.43",
    "office-ui-fabric-react": "7.185.7",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "tslib": "2.3.1",
    "yup": "^1.2.0"
  },
  "devDependencies": {
    "@microsoft/rush-stack-compiler-4.5": "0.2.2",
    "@rushstack/eslint-config": "2.5.1",
    "@microsoft/eslint-plugin-spfx": "1.15.2",
    "@microsoft/eslint-config-spfx": "1.15.2",
    "@microsoft/sp-build-web": "1.15.2",
    "@types/webpack-env": "~1.15.2",
    "ajv": "^6.12.5",
    "gulp": "4.0.2",
    "typescript": "4.5.5",
    "@types/react": "16.9.51",
    "@types/react-dom": "16.9.8",
    "eslint-plugin-react-hooks": "4.3.0",
    "@microsoft/sp-module-interfaces": "1.15.2"
  }
}

I also tried to update to SPFx version 1.17.3 but that did not help either. Here is package,json content after the SPFx update

{
  "name": "visitor-request-creation-web-part",
  "version": "0.0.1",
  "private": true,
  "main": "lib/index.js",
  "scripts": {
    "build": "gulp bundle",
    "clean": "gulp clean",
    "test": "gulp test"
  },
  "dependencies": {
    "@fluentui/react": "7.199.1",
    "@microsoft/sp-adaptive-card-extension-base": "1.17.3",
    "@microsoft/sp-core-library": "1.17.3",
    "@microsoft/sp-lodash-subset": "1.17.3",
    "@microsoft/sp-office-ui-fabric-core": "1.17.3",
    "@microsoft/sp-property-pane": "1.17.3",
    "@microsoft/sp-webpart-base": "1.17.3",
    "@pnp/graph": "^3.18.0",
    "@pnp/sp": "^3.17.0",
    "@pnp/spfx-controls-react": "^3.16.0-beta.6624416",
    "formik": "^2.4.3",
    "moment-timezone": "^0.5.43",
    "office-ui-fabric-react": "7.199.1",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "tslib": "2.3.1",
    "yup": "^1.2.0"
  },
  "devDependencies": {
    "@microsoft/eslint-config-spfx": "1.17.3",
    "@microsoft/eslint-plugin-spfx": "1.17.3",
    "@microsoft/rush-stack-compiler-4.5": "0.5.0",
    "@microsoft/sp-build-web": "1.17.3",
    "@microsoft/sp-module-interfaces": "1.17.3",
    "@rushstack/eslint-config": "2.5.1",
    "@types/react": "17.0.45",
    "@types/react-dom": "17.0.17",
    "@types/webpack-env": "~1.15.2",
    "ajv": "^6.12.5",
    "eslint": "8.7.0",
    "eslint-plugin-react-hooks": "4.3.0",
    "gulp": "4.0.2",
    "typescript": "4.5.5"
  },
  "engines": {
    "node": ">=16.13.0 <17.0.0"
  }
}

@zarovkaHans
Copy link
Author

Hi again,

so, I finally solved it. And this issue can be closed.

I am not entirely sure why it started working when I deleted the complete folder with cloned project, removing all installed node_modules etc.
Then cloned the project again from AzureDevOps repo and run npm install with the following package.json content

{
  "name": "visitor-request-creation-web-part",
  "version": "0.0.1",
  "private": true,
  "main": "lib/index.js",
  "scripts": {
    "build": "gulp bundle",
    "clean": "gulp clean",
    "test": "gulp test"
  },
  "dependencies": {
    "@fluentui/react": "7.199.1",
    "@microsoft/sp-adaptive-card-extension-base": "1.17.3",
    "@microsoft/sp-core-library": "1.17.3",
    "@microsoft/sp-lodash-subset": "1.17.3",
    "@microsoft/sp-office-ui-fabric-core": "1.17.3",
    "@microsoft/sp-property-pane": "1.17.3",
    "@microsoft/sp-webpart-base": "1.17.3",
    "@pnp/graph": "^3.18.0",
    "@pnp/sp": "^3.17.0",
    "@pnp/spfx-controls-react": "^3.16.0-beta.6691242",
    "formik": "^2.4.3",
    "moment-timezone": "^0.5.43",
    "office-ui-fabric-react": "7.199.1",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "tslib": "2.3.1",
    "yup": "^1.2.0"
  },
  "devDependencies": {
    "@microsoft/eslint-config-spfx": "1.17.3",
    "@microsoft/eslint-plugin-spfx": "1.17.3",
    "@microsoft/rush-stack-compiler-4.5": "0.5.0",
    "@microsoft/sp-build-web": "1.17.3",
    "@microsoft/sp-module-interfaces": "1.17.3",
    "@rushstack/eslint-config": "2.5.1",
    "@types/react": "17.0.45",
    "@types/react-dom": "17.0.17",
    "@types/webpack-env": "~1.15.2",
    "ajv": "^6.12.5",
    "eslint": "8.7.0",
    "eslint-plugin-react-hooks": "4.3.0",
    "gulp": "4.0.2",
    "typescript": "4.5.5"
  },
  "engines": {
    "node": ">=16.13.0 <17.0.0"
  }
}

after doing this gulp serve is not showing those warnings anymore and both ListItemAttachments and PeoplePicker control work just fine.

Thanx everyone for help!

@michaelmaillot
Copy link
Collaborator

Glad to know that you could solve this!

I was about to suggest you to clean up the node_modules folder, since I couldn't repro the issue you met. And as sometimes npm & dependancies can be capricious (as the package-lock.json also) if you add / update / remove some packages, a fresh project reinstall can help start over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:duplicate Duplicate of another issue. See comments for reference to other issue. Duplicates typically closed. status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Projects
None yet
Development

No branches or pull requests

3 participants