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.

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

default discord avatar
cor.vanoostenbrugge2 years 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
    taun21602 years 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.vanoostenbrugge2 years 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
    taun21602 years 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.vanoostenbrugge2 years ago

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

  • default discord avatar
    taun21602 years ago

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

  • discord user avatar
    patrikkozak
    2 years ago

    Hey

    @1062756035967860737

    - I just went ahead and updated next to latest as well and seems to be working for me

  • default discord avatar
    taun21602 years ago
    https://github.com/payloadcms

    Checkout website and websit-cms repos.

  • discord user avatar
    patrikkozak
    2 years ago

    Can you run

    yarn

    for me and try it again?

  • default discord avatar
    cor.vanoostenbrugge2 years ago

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

  • discord user avatar
    patrikkozak
    2 years 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

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.