Hi! i've started a new project based on the "Payload + NextJS Server-Rendered TypeScript Boilerplate" found here:
https://github.com/payloadcms/nextjs-custom-serverwhen you just clone the project and run yarn dev the app starts perfectly. But when i update Next.js to its latest version all Next.js pages are crashing with this error:
Error: connect ECONNREFUSED ::1:65288
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 65288
}
"Hard to help with no code; I upgraded and cleared my MongoDB, and it works perfectly. But try to clean the cache.
I use the task "clean": "rimraf ./node_modules/.cache ./dist ./build"
Hey Taun, well.. i just cloned the boilerplate repo, ran yarn add next@latest and started the application by running yarn dev and it stopped working
Yea, my reply was a quote from another thread with a similar title. The custom-server seems to be more troublesome than running a CMS and different Next repo individually.
hmm, that's a pitty. i like the idea of running both apps in a single repo and express server
Me too, it seems the most easy path leads to ones demise.
Hey @cor.vanoostenbrugge - I just went ahead and updated next to latest as well and seems to be working for me
Can you run
yarn
for me and try it again?
same error unfortunately. I'm using the approuter, maybe that's the difference?
Check out these two links - should give you some insight into resolving your errors
-
https://github.com/payloadcms/nextjs-custom-server/issues/23-
https://github.com/payloadcms/payload/pull/2920Let me know if these help
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.