sp-dev-fx-property-controls icon indicating copy to clipboard operation
sp-dev-fx-property-controls copied to clipboard

React 17.0.1 and SPFx 1.16.1 (Dependencies)

Open jtlivio opened this issue 2 years ago • 6 comments

Hello, has anyone gone through this?

Category

  • [ ] Enhancement
  • [ ] Bug
  • [x] Question

Version

v.3.12.0

Error in

npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0" from [email protected]

Steps to Reproduce

Install SPFx 1.16.1

Full Error

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]   
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   peer react@">=16.8.0 <18.0.0" from @fluentui/[email protected]
npm WARN   node_modules/@fluentui/react
npm WARN     @fluentui/react@"^7.199.1" from @microsoft/[email protected]
npm WARN     node_modules/@microsoft/sp-component-base
npm WARN     5 more (@microsoft/sp-loader, @microsoft/sp-property-pane, ...)
npm WARN   29 more (@fluentui/react-compose, @fluentui/react-focus, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0" from [email protected]
npm WARN node_modules/react-ace
npm WARN   react-ace@"5.8.0" from @pnp/[email protected]
npm WARN   node_modules/@pnp/spfx-property-controls
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0" from [email protected]
npm WARN   node_modules/react-ace
npm WARN     react-ace@"5.8.0" from @pnp/[email protected]
npm WARN     node_modules/@pnp/spfx-property-controls
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react-dom
npm WARN   peer react-dom@">=16.8.0 <18.0.0" from @fluentui/[email protected]
npm WARN   node_modules/@fluentui/react
npm WARN     @fluentui/react@"^7.199.1" from @microsoft/[email protected]
npm WARN     node_modules/@microsoft/sp-component-base
npm WARN     5 more (@microsoft/sp-loader, @microsoft/sp-property-pane, ...)
npm WARN   23 more (@fluentui/react-focus, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0" from [email protected]
npm WARN node_modules/react-ace
npm WARN   react-ace@"5.8.0" from @pnp/[email protected]
npm WARN   node_modules/@pnp/spfx-property-controls
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0" from [email protected]
npm WARN   node_modules/react-ace
npm WARN     react-ace@"5.8.0" from @pnp/[email protected]
npm WARN     node_modules/@pnp/spfx-property-controls`bash

jtlivio avatar Apr 05 '23 11:04 jtlivio

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

ghost avatar Apr 05 '23 11:04 ghost

Version mismatch happens when project-level SPFx version is different than version of sp-dev-fx-property-controls' 1.16.0

image

If project-level packages @microsoft/sp-property-pane and @microsoft/sp-webpart-base are downgraded to 1.16.0 then issue seems fixed:

npm install @microsoft/[email protected] @microsoft/[email protected] --save

ArtyomShegeda avatar Apr 11 '23 18:04 ArtyomShegeda

Thank you for your help.

jtlivio avatar Apr 11 '23 18:04 jtlivio

@ArtyomShegeda for the issue in matter, you can still use the controls if

this.context as any

jtlivio avatar Apr 15 '23 20:04 jtlivio

Hello @ArtyomShegeda issue still remain after

npm install @microsoft/[email protected] @microsoft/[email protected] --save
npm install @pnp/spfx-property-controls --save --save-exact

Do you have any other suggestions?

jtlivio avatar Apr 20 '23 17:04 jtlivio

Solved by

npm install @microsoft/[email protected] @microsoft/[email protected] --save
npm install @pnp/[email protected] --save --save-exact

jtlivio avatar Apr 20 '23 17:04 jtlivio