I wanted to install a new component, so I installed it with the same command used to install the other components (@udecode/plate-ui@latest add [platejs component name)
I wanted the image element component, so I did npx @udecode/plate-ui@latest add image-element
But it didn't work as usual, I got this error:
npx @udecode/plate-ui@latest add image-element
⠸ Installing image-element...Command failed with exit code 1: npm install @udecode/plate-media
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: portfolio-react@0.0.0
npm ERR! Found: @udecode/plate-common@30.4.5
npm ERR! node_modules/@udecode/plate-common
npm ERR! @udecode/plate-common@"^30.4.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @udecode/plate-common@">=31.0.0" from @udecode/plate-media@31.0.0
npm ERR! node_modules/@udecode/plate-media
npm ERR! @udecode/plate-media@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Could not resolve dependency:
peer @udecode/plate-common@">=31.0.0"
I changed "@udecode/plate-common": "^30.4.5" to "@udecode/plate-common": "^31.3.2" the latest version on npm in my package.json
Then I did npm update --save, npm install, but I get lots of errors because all the other components were installed with udecode/plate-common ^30.4.5 and depend on this version
npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: portfolio-react@0.0.0
npm WARN Found: @udecode/plate-common@30.4.5
npm WARN node_modules/@udecode/plate-common
npm WARN @udecode/plate-common@"^31.3.2" from the root project
npm WARN 42 more (@udecode/plate, @udecode/plate-alignment, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-alignment@30.5.3
npm WARN node_modules/@udecode/plate-alignment
npm WARN @udecode/plate-alignment@"^30.5.3" from the root project
npm WARN 1 more (@udecode/plate)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: portfolio-react@0.0.0
npm WARN Found: @udecode/plate-common@30.4.5
npm WARN node_modules/@udecode/plate-common
npm WARN @udecode/plate-common@"^31.3.2" from the root project
npm WARN 42 more (@udecode/plate, @udecode/plate-alignment, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-basic-elements@30.7.0
npm WARN node_modules/@udecode/plate-basic-elements
npm WARN @udecode/plate-basic-elements@"^30.7.0" from the root project
npm WARN 1 more (@udecode/plate)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: portfolio-react@0.0.0
npm WARN Found: @udecode/plate-common@30.4.5
npm WARN node_modules/@udecode/plate-common
npm WARN @udecode/plate-common@"^31.3.2" from the root project
npm WARN 42 more (@udecode/plate, @udecode/plate-alignment, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-basic-marks@30.5.3
npm WARN node_modules/@udecode/plate-basic-marks
npm WARN @udecode/plate-basic-marks@"^30.5.3" from the root project
npm WARN 2 more (@udecode/plate, @udecode/plate-serializer-md)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: portfolio-react@0.0.0
npm WARN Found: @udecode/plate-common@30.4.5
npm WARN node_modules/@udecode/plate-common
npm WARN @udecode/plate-common@"^31.3.2" from the root project
npm WARN 42 more (@udecode/plate, @udecode/plate-alignment, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-block-quote@30.5.3
npm WARN node_modules/@udecode/plate-block-quote
npm WARN @udecode/plate-block-quote@"^30.5.3" from the root project
npm WARN 3 more (@udecode/plate, @udecode/plate-basic-elements, @udecode/plate-serializer-md)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: portfolio-react@0.0.0
npm WARN Found: @udecode/plate-common@30.4.5
npm WARN Could not resolve dependency:
npm WARN peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-cursor@30.5.3
npm WARN node_modules/@udecode/plate-cursor
npm WARN @udecode/plate-cursor@"^30.5.3" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: portfolio-react@0.0.0
npm WARN Found: @udecode/plate-common@30.4.5
npm WARN node_modules/@udecode/plate-common
npm WARN @udecode/plate-common@"^31.3.2" from the root project
npm WARN 42 more (@udecode/plate, @udecode/plate-alignment, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-dnd@30.5.3
npm WARN node_modules/@udecode/plate-dnd
npm WARN @udecode/plate-dnd@"^30.5.3" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: portfolio-react@0.0.0
npm WARN Found: @udecode/plate-common@30.4.5
npm WARN node_modules/@udecode/plate-common
npm WARN @udecode/plate-common@"^31.3.2" from the root project
npm WARN 42 more (@udecode/plate, @udecode/plate-alignment, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-floating@30.5.3
npm WARN node_modules/@udecode/plate-floating
npm WARN @udecode/plate-floating@"^30.5.3" from the root project
npm WARN 2 more (@udecode/plate, @udecode/plate-link)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: portfolio-react@0.0.0
npm WARN Found: @udecode/plate-common@30.4.5
npm WARN node_modules/@udecode/plate-common
npm WARN @udecode/plate-common@"^31.3.2" from the root project
npm WARN 42 more (@udecode/plate, @udecode/plate-alignment, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-heading@30.5.3
npm WARN node_modules/@udecode/plate-heading
npm WARN @udecode/plate-heading@"^30.5.3" from the root project
npm WARN 4 more (@udecode/plate, @udecode/plate-basic-elements, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: portfolio-react@0.0.0
npm WARN Found: @udecode/plate-common@30.4.5
npm WARN node_modules/@udecode/plate-common
npm WARN @udecode/plate-common@"^31.3.2" from the root project
npm WARN 42 more (@udecode/plate, @udecode/plate-alignment, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-line-height@30.5.3
npm WARN node_modules/@udecode/plate-line-height
npm WARN @udecode/plate-line-height@"^30.5.3" from the root project
npm WARN 1 more (@udecode/plate)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: portfolio-react@0.0.0
npm WARN Found: @udecode/plate-common@30.4.5
npm WARN node_modules/@udecode/plate-common
npm WARN @udecode/plate-common@"^31.3.2" from the root project
npm WARN 42 more (@udecode/plate, @udecode/plate-alignment, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-mention@30.5.3
npm WARN node_modules/@udecode/plate-mention
npm WARN @udecode/plate-mention@"^30.5.3" from the root project
npm WARN 1 more (@udecode/plate)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: portfolio-react@0.0.0
npm WARN Found: @udecode/plate-common@30.4.5
npm WARN node_modules/@udecode/plate-common
npm WARN @udecode/plate-common@"^31.3.2" from the root project
npm WARN 42 more (@udecode/plate, @udecode/plate-alignment, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-paragraph@30.5.3
npm WARN node_modules/@udecode/plate-paragraph
npm WARN @udecode/plate-paragraph@"^30.5.3" from the root project
npm WARN 4 more (@udecode/plate, @udecode/plate-basic-elements, ...)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: portfolio-react@0.0.0
npm ERR! Found: @udecode/plate-common@31.3.2
npm ERR! node_modules/@udecode/plate-common
npm ERR! @udecode/plate-common@"^31.3.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @udecode/plate-common@">=30.4.5 < 31" from @udecode/plate-alignment@30.5.3
npm ERR! node_modules/@udecode/plate-alignment
npm ERR! @udecode/plate-alignment@"^30.5.3" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\maxen\AppData\Local\npm-cache\_logs\2024-04-10T17_35_46_285Z-eresolve-report.txt
Description
Steps to Reproduce
I wanted to install a new component, so I installed it with the same command used to install the other components (@udecode/plate-ui@latest add [platejs component name)
I wanted the image element component, so I did npx @udecode/plate-ui@latest add image-element
But it didn't work as usual, I got this error:
My package.json :
As mentioned here
I changed "@udecode/plate-common": "^30.4.5" to "@udecode/plate-common": "^31.3.2" the latest version on npm in my package.json
Then I did npm update --save, npm install, but I get lots of errors because all the other components were installed with udecode/plate-common ^30.4.5 and depend on this version
Sandbox
Expected Behavior
Environment
Bounty
Click here to add a bounty via Algora.
Funding