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.

Installing Payload without errors

default discord avatar
julian.urabllast year
18

Hey guys, I'm trying to install payload but can't seem to be able to do so without errors these days.



I tried running


npx create-payload-app@latest


When I spin up a dev server and visit localhost:3000/admin I get this though (screenshot attached):



Module not found: Can't resolve 'payload/shared'



I tried reinstalling dependencies with


npm i


but I get..



ERESOLVE unable to resolve dependency tree


Found: payload@2.30.3


Could not resolve dependency:


peer payload@"3.0.0-beta.122" from @payloadcms/next@3.0.0-beta.122



I also tried


npx create-payload-app


but ran into the first issue again

  • default discord avatar
    zed0547last year

    Hey

    @772528578058911765

    ,



    It seems you're trying to install Payload v3 dependencies and are mixing in Payload v2 ones as well. That won't work. Try

    npx create-payload-app@beta

    and make sure all of your Payload plugins match to the same version when you install them.

  • default discord avatar
    julian.urabllast year

    It does look like that to me as well, but that is the predefined dependency config I get when running npx create-payload-app



    So I'm not mixing anything myself here.



    Should npx create-payload-app@latest work like described in the docs? Is this supposed to install beta or stable?



    I'm not intending to work with beta as I want to use this in production

  • default discord avatar
    zed0547last year

    That's exactly what's happening. For V2 (Stable) you can do

    npx create-payload-app@latest

    Mind sharing your package.json?



    I've never seen it do that by itself on install, super strange

  • default discord avatar
    kokopilast year

    im having the same issue with

    npx create-payload-app@latest

    where it installs beta stuff and gives the same error described above. and running @beta works

  • default discord avatar
    zed0547last year

    Hmm alright, I'm trying this out right now - hang tight and thanks for your patience

  • default discord avatar
    kokopilast year

    also not compatible with node 23 apparently

  • default discord avatar
    zed0547last year

    Yeah v2 at this point is kind of on life support



    It's full steam ahead for v3



    Yup reproduced:



    ...
    "dependencies": {
        "@payloadcms/db-mongodb": "^1.0.0",
        "@payloadcms/live-preview-react": "beta",
        "@payloadcms/next": "beta",
        "@payloadcms/payload-cloud": "beta",
        "@payloadcms/plugin-form-builder": "beta",
        "@payloadcms/plugin-nested-docs": "beta",
        "@payloadcms/plugin-redirects": "beta",
        "@payloadcms/plugin-search": "beta",
        "@payloadcms/plugin-seo": "beta",
        "@payloadcms/richtext-lexical": "beta",
        "@payloadcms/ui": "beta",
    ...


    On a fresh website template



    I'll write an issue for this, in the meantime the workaround would be to install packages consistent with the template you're trying to use:

    https://github.com/payloadcms/payload/tree/main/templates
  • default discord avatar
    wing_tomlast year

    i'm having similar issues.


    i wanted to run 3.0 beta but i ran @latest and got "beta" on all the versions.



    Changed them all to 3.0.0-beta.122 (that seems to require react 19) but the richtext-slate package isn't compatible with react 19.

  • default discord avatar
    zed0547last year

    In your case you can run

    @beta

    on the cli command



    And be mindful as the React 19 version is pinned for v3



    I have an issue up, hang tight

  • default discord avatar
    michelcodelast year

    Happens here as well, using the blank template..

  • default discord avatar
    zed0547last year

    It's going to happen with all the templates (maybe with exception of payload-website) - I believe because the beta branch was set as default but I could be wrong here. Seems we're

    bleeding edge

    close to v3 being considered main, literally lol



    Hang tight

  • default discord avatar
    julian.urabllast year

    😄

  • default discord avatar
    zed0547last year

    Thanks for opening a thread here for this: looks like the devs are on it

  • discord user avatar
    denolfe
    last year

    Yep, looking into. We did some branch switching in the repo last night which likely is the cause.

  • default discord avatar
    zed0547last year

    Thanks Elliot

  • discord user avatar
    denolfe
    last year

    Just forgot to publish the new version that pins the version 😅

  • default discord avatar
    zed0547last year

    Works perfectly for me now -

    @772528578058911765

    should be good to go. I encourage you to mark this thread solved (via

    /solve

    ) in case there are other users who stumble across this and haven't checked closed issues in gh. Appreciate the speedy response and fix Elliot!

  • default discord avatar
    julian.urabllast year

    Awesome thanks! Will check asap and solve



    Works like a charm. Thanks for the quick response and to everyone helping to investigate the issue 🙏

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.