I have upgraded Next.js to 13.4.1 and everything works fine on the first render, but after reloading which takes quite a long time, it throws the error below.
Error: connect ECONNREFUSED 127.0.0.1:62596
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 62596
}
I don't know which part of my code causes this but it's a big project though and have multiple pages.
When I run yarn build
, I got this error Error: You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps
.
I have searched for solutions everyone but can't get it work til now.
This github link has some responses but not what I am really looking for.
There is also one here, but didn't help