next-payload / redirect plugin

default discord avatar
3 months ago

Has anyone been able to get the redirects plugin working on next-payload?

The plugin works on payload side, but when using redirects in next.config.js from the redirects example, starting dev server results in:

TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11118:11)
    at async module.exports [as redirects] (/next-cms-payload/redirects.js:21:24)
    at async loadRedirects (/next-cms-payload/node_modules/next/dist/lib/load-custom-routes.js:365:21)
    at async Promise.all (index 2)
    at async loadCustomRoutes (/next-cms-payload/node_modules/next/dist/lib/load-custom-routes.js:439:44)
    at async DevServer.prepareImpl (/next-cms-payload/node_modules/next/dist/server/dev/next-dev-server.js:648:29)
    at async NextServer.prepare (/next-cms-payload/node_modules/next/dist/server/next.js:165:13)
    at async Server.<anonymous> (/next-cms-payload/node_modules/next/dist/server/lib/render-server.js:124:17) {
  type: 'TypeError',
  cause: {
    name: 'HeadersTimeoutError',
    message: 'Headers Timeout Error'

Is there any way to get this working?

next-payload / redirect plugin

  • discord user avatar
    Payload Team
    2 months ago

    Hey @dbssd were you able to get this sorted out, or do you need a hand yet?

  • default discord avatar
    2 months ago

    Hey, unfortunately we were not able to get it sorted, but we were also not sure if the form builder plugin would work on next-payload and since it isn't a stable release we decided to move to normal payload hosted on for the time being.

    We were excited for next-payload as we are building mostly static websites and it was a great way to keep costs down going serverless, cold starts didn't bother us for fully static websites that don't change every day, but we are just as happy with payload on a server.

    Will revisit next-payload in the future if/when it becomes more supported/viable

  • discord user avatar
    Payload Team
    2 months ago

    That makes sense, we're around if you need anything else!

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!


Connect with the Payload Community on Discord



Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.