payloadcms/public-demo

Could not resolve dependency: @payloadcms/plugin-form-builder

isaiahdahl opened this issue · 4 comments

Tried cloning the repo and running npm install (after deleting yarn.lock)

 code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: payload-public-demo@1.0.0
npm ERR! Found: payload@1.1.4
npm ERR! node_modules/payload
npm ERR!   payload@"^1.1.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer payload@"^0.18.5" from @payloadcms/plugin-form-builder@1.0.7
npm ERR! node_modules/@payloadcms/plugin-form-builder
npm ERR!   @payloadcms/plugin-form-builder@"^1.0.2" 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! See /Users/isaiahdahl/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/isaiahdahl/.npm/_logs/2022-09-24T05_35_54_454Z-debug-0.log

What happens if you delete node_modules also when deleting yarn.lock, does it install after that?

Looking at the versions of Payload and plugins mentioned there shouldn't be any problem.

It was a fresh clone so there aren’t any node_modules to delete.

Looks like Plugin-form-builder needs a newer version of payload as it’s peer-dependency.

Ah, yeah, just run npm install --legacy-peer-deps. Or use Yarn. We typically use Yarn so we don't have those issues but regardless, we can update that plugin to show compatibility with newer Payload versions 👍

Hey @isaiahdahl, this has been fixed with payloadcms/payload#2656. The --legacy-peer-deps flag is no longer required. Update to the latest version of Payload and let me know how it goes!