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.

After reinstalling Payload I get weird errors

default discord avatar
artmelkonlast year
9

After reinstalling payload I get these 3 messages that doesn't make sense to me, however when I checked the payload.config.js file it seams config module is missing or could be something else not sure. All the lines have red error underlines. How to get this fixed, the code used to work fine before re-installation.

  • discord user avatar
    denolfe
    last year

    Hey

    @839277522956845158

    , were you on Payload 1.0 previously? It looks like this project is now on 2.0 with a 1.0 config. Is that the case?

  • default discord avatar
    artmelkonlast year

    Yes, it was



    I managed it working now



    But I think there might need some correction. After moving bunlder into admin and fixing db: mongooseAdapter({url: proessess.env.MY_DB})

  • discord user avatar
    denolfe
    last year

    Are you getting an error? Could you explain more?

  • default discord avatar
    artmelkonlast year

    I was getting buy after these fixes I don't get any for now, it connected smoothly

  • discord user avatar
    denolfe
    last year

    Great to hear 👍

  • default discord avatar
    artmelkonlast year

    First it was complaining about the DB url, as I mentioned above, after checking your code I made some corrections to the config file and the connection was successful.



    The second error was about bunder, and after reading the error I realized that it should be moved from top tier into admin{}, and that was my final change to the config file

  • discord user avatar
    denolfe
    last year

    Awesome



    For anyone else stumbling upon this thread. The write-up for upgrading to 2.0 is located here:

    https://github.com/payloadcms/payload/releases/tag/v2.0.0
  • default discord avatar
    fatso8855last year

    I'm also running into similar issues. I've read the release notes and am none the wiser.



    I get the following output when running the migrate script:



    [23:46:56] ERROR (payload): There were 5 errors validating your Payload config
    [23:46:56] ERROR (payload): 1: Collection "pages" > Field "blocks" > "value" does not match any of the allowed types
    ...
    [23:46:56] ERROR (payload): 5: Collection "questions" > Field "faqs" > "value" does not match any of the allowed types


    The first error relates to this I believe:



    /collections/pages.ts:


    fields: [
    ...
    {
          name: "blocks",
          type: "blocks",
          blocks: [
            ReusableContent, 
            FAQcontent, 
            ...
            Hero,      
          ],
        },
    ]
  • default discord avatar
    jamesryandevlast year

    what was the fix in the end? I'm expereicing this also



    did you find a fix OP?



    found it

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.