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.

Redirect plugin issue with custom next js server

default discord avatar
redhorse7422.last year
8

Hi. i am using next custom server and i have just add redirect plugin and in next.js i am just want to fetch the collection record of redirects and in production mode its working fine but foe build mode its not working, giving error that no collection found. please someone can help me on this



Redirect plugin issue with custom next js server

  • default discord avatar
    notchrlast year
    @1088085593034084382

    Good morning - can we check out your redirects collection config?

  • default discord avatar
    redhorse7422.last year

    its directly created by redirect plugin

  • default discord avatar
    notchrlast year

    Hmm,

    @808734492645785600

    was the last person to touch this plugin, perhaps they can provide some info!

  • default discord avatar
    redhorse7422.last year
    @808734492645785600

    Could you please look into this

  • discord user avatar
    jacobsfletch
    last year
    @1088085593034084382

    can you show how you’re calling the plugin in your Payload config?

  • default discord avatar
    redhorse7422.last year
  • discord user avatar
    jacobsfletch
    last year
    @1088085593034084382

    you need to remove

    redirects

    from the

    collections

    array in your plugin config, that will likely fix your issue 👍



    the plugin instantiates that collection for you, and so you are referencing a collection that does not yet exist

  • default discord avatar
    redhorse7422last year
    @808734492645785600

    issue is that actually its working fine in production mode but in build mode its not working giving error



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.