Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

website template errors on npm install

default discord avatar
hades200082last year
8

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.
  • discord user avatar
    denolfe
    last year

    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.

  • default discord avatar
    manny_49461last year

    @denolfe So would form builder work on 2.0 if using yarn?

  • discord user avatar
    denolfe
    last year

    A beta version has been released with proper peer dependencies. You can give that a try.

  • default discord avatar
    manny_49461last year

    Oh awesome, sorry but where would I find that? Is it this?

    https://github.com/payloadcms/plugin-form-builder/pull/63
  • discord user avatar
    denolfe
    last year

    We migrated it into our monorepo actually.



    Should be able to do just install @payloadcms/plugin-form-builder@beta

  • default discord avatar
    manny_49461last year

    Ahh gotcha, thank you Elliot!

  • discord user avatar
    denolfe
    last year

    Still need to do some cleanup and archive that old repo. Was waiting for some people to try out the beta before doing so.

  • default discord avatar
    manny_49461last year

    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 on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team..