I get the following errors after getting the template with
npx create-payload-app my-project -t website --use-npm
and then running
npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @payloadcms/plugin-form-builder@1.0.15
npm ERR! Found: payload@2.0.13
npm ERR! node_modules/payload
npm ERR! payload@"^2.0.0" from the root project
npm ERR! peer payload@"^2.0.0" from @payloadcms/bundler-webpack@1.0.4
npm ERR! node_modules/@payloadcms/bundler-webpack
npm ERR! @payloadcms/bundler-webpack@"^1.0.0" from the root project
npm ERR! 5 more (@payloadcms/db-mongodb, @payloadcms/plugin-cloud, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer payload@"^0.18.5 || ^1.0.0" from @payloadcms/plugin-form-builder@1.0.15
npm ERR! node_modules/@payloadcms/plugin-form-builder
npm ERR! @payloadcms/plugin-form-builder@"^1.0.13" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: payload@1.15.8
npm ERR! node_modules/payload
npm ERR! peer payload@"^0.18.5 || ^1.0.0" from @payloadcms/plugin-form-builder@1.0.15
npm ERR! node_modules/@payloadcms/plugin-form-builder
npm ERR! @payloadcms/plugin-form-builder@"^1.0.13" 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.
Looks like we need to update that package's peer deps to include 2.0.
In the meantime, if you still want to use npm as your package manager, you'll need to make an npmrc with legacy peer deps set to true.
@denolfe So would form builder work on 2.0 if using yarn?
A beta version has been released with proper peer dependencies. You can give that a try.
Oh awesome, sorry but where would I find that? Is it this?
https://github.com/payloadcms/plugin-form-builder/pull/63We migrated it into our monorepo actually.
Should be able to do just install @payloadcms/plugin-form-builder@beta
Ahh gotcha, thank you Elliot!
Still need to do some cleanup and archive that old repo. Was waiting for some people to try out the beta before doing so.
I'll definitely be trying it out. Need to launch a client site before December, would love to include form builder 😬
It seems to be working well, I was able to fix the issues I was having by adding transpilePackages: ["@payloadcms/plugin-form-builder"] to next.config.js
Star
Discord
online
Get dedicated engineering support directly from the Payload team..