ECONNREFUSED after updating Next.js to 13.4+ with the Payload + Next.js boilerplate

default discord avatar
cor.vanoostenbrugge
2 months ago
10

Hi! i've started a new project based on the "Payload + NextJS Server-Rendered TypeScript Boilerplate" found here:

https://github.com/payloadcms/nextjs-custom-server

when 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
}
  • default discord avatar
    taun2160
    2 months ago

    "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"

  • default discord avatar
    cor.vanoostenbrugge
    2 months ago

    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

  • default discord avatar
    taun2160
    2 months ago

    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.

  • default discord avatar
    cor.vanoostenbrugge
    2 months ago

    hmm, that's a pitty. i like the idea of running both apps in a single repo and express server

  • default discord avatar
    taun2160
    2 months ago

    Me too, it seems the most easy path leads to ones demise.

  • discord user avatar
    patrikkozak
    Payload Team
    2 months ago

    Hey @cor.vanoostenbrugge - I just went ahead and updated next to latest as well and seems to be working for me

  • default discord avatar
    taun2160
    2 months ago
    https://github.com/payloadcms

    Checkout website and websit-cms repos.

  • discord user avatar
    patrikkozak
    Payload Team
    2 months ago

    Can you run

    yarn

    for me and try it again?

  • default discord avatar
    cor.vanoostenbrugge
    2 months ago

    same error unfortunately. I'm using the approuter, maybe that's the difference?

  • discord user avatar
    patrikkozak
    Payload Team
    2 months ago

    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/2920

    Let me know if these help

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

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

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