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',
code: 'UND_ERR_HEADERS_TIMEOUT',
message: 'Headers Timeout Error'
}
}
Is there any way to get this working?
next-payload / redirect plugin
Hey @dbssd were you able to get this sorted out, or do you need a hand yet?
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 render.com 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
That makes sense, we're around if you need anything else!
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.