Closed ntungare closed 3 weeks ago
Multiple field editors use constate which was last released ~2 years ago and does not support React 18 and newer versions.
constate
This leads to peer dependency issues on the newer npm versions as such as:
npm
npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: constate@3.2.0 npm WARN Found: react@18.2.0 npm WARN node_modules/react npm WARN react@"^18.2.0" from the root project npm WARN 179 more (@contentful/default-field-editors, ...) npm WARN npm WARN Could not resolve dependency: npm WARN peer react@"^16.8.0 || ^17.0.0" from constate@3.2.0 npm WARN node_modules/@contentful/field-editor-reference/node_modules/constate npm WARN constate@"3.2.0" from @contentful/field-editor-reference@5.26.0 npm WARN node_modules/@contentful/field-editor-reference npm WARN npm WARN Conflicting peer dependency: react@17.0.2 npm WARN node_modules/react npm WARN peer react@"^16.8.0 || ^17.0.0" from constate@3.2.0 npm WARN node_modules/@contentful/field-editor-reference/node_modules/constate npm WARN constate@"3.2.0" from @contentful/field-editor-reference@5.26.0 npm WARN node_modules/@contentful/field-editor-reference npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: constate@3.2.0 npm WARN Found: react@18.2.0 npm WARN node_modules/react npm WARN react@"^18.2.0" from the root project npm WARN 179 more (@contentful/default-field-editors, ...) npm WARN npm WARN Could not resolve dependency: npm WARN peer react@"^16.8.0 || ^17.0.0" from constate@3.2.0 npm WARN node_modules/@contentful/field-editor-rich-text/node_modules/constate npm WARN constate@"3.2.0" from @contentful/field-editor-rich-text@3.19.5 npm WARN node_modules/@contentful/field-editor-rich-text npm WARN npm WARN Conflicting peer dependency: react@17.0.2 npm WARN node_modules/react npm WARN peer react@"^16.8.0 || ^17.0.0" from constate@3.2.0 npm WARN node_modules/@contentful/field-editor-rich-text/node_modules/constate npm WARN constate@"3.2.0" from @contentful/field-editor-rich-text@3.19.5 npm WARN node_modules/@contentful/field-editor-rich-text
Dependency tree
├─┬ @contentful/default-field-editors@1.6.29 │ ├─┬ @contentful/field-editor-markdown@1.5.7 │ │ └── constate@3.3.2 │ └─┬ @contentful/field-editor-reference@5.26.0 │ └── constate@3.2.0 └─┬ @contentful/field-editor-rich-text@3.19.5 └── constate@3.2.0
In particular this seems to have been caused by declaring an exact version in some places and using caret version in others, eg rich-text vs markdown. The use of caret versions everywhere is likely the better here.
Marking issue as stale since there was no activity for 30 days
Multiple field editors use
constate
which was last released ~2 years ago and does not support React 18 and newer versions.This leads to peer dependency issues on the newer
npm
versions as such as:Dependency tree
In particular this seems to have been caused by declaring an exact version in some places and using caret version in others, eg rich-text vs markdown. The use of caret versions everywhere is likely the better here.