nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.02k stars 615 forks source link

@nuxt/content 2.13.1 -> ERROR [unhandledRejection] connect ECONNREFUSED 127.0.0.1:49363 #2691

Open XStarlink opened 1 week ago

XStarlink commented 1 week ago

Environment

Reproduction

.

Describe the bug

Hi, when I upgrade from @nuxt/content v2.13.0 to v2.13.1 and make any change in /server, I get this error in console:

 ERROR [unhandledRejection] connect ECONNREFUSED 127.0.0.1:49363 18:49:19
  at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16)

I can't even refresh the app page which loads indefinitely, and even restarting the dev server doesn't solve the problem. I have to delete the .nuxt folder and restart.

And when I go back to @nuxt/content v2.13.0 I don't have the problem anymore.

I researched the error, and came across this issue: https://github.com/nuxt/nuxt/issues/23832

It seems to be related to Vite and HMR when using plugins with addVitePlugin, and comparing the code of version v2.13.0 with v2.13.1 we see that the use of Vite and plugins has been modified, so it may come from there.

I'll try to make a reproduction as soon as I have a bit more time.

Additional context

No response

Logs

No response

yurijmikhalevich commented 1 week ago

Faced the same issue on macOS; switching to node v18 fixed it for me.

prostohttp commented 1 week ago

Same issues on macOS; switching to node v18 didn't help me. I get this error, for example, when saving a mongoose schema or when changing files. I also had "@nuxt/content": "^2.13.1" installed, changing the version to "@nuxt/content": "^2.13.0" did not solve the problem.

Снимок экрана 2024-07-08 в 10 18 16
prostohttp commented 1 week ago

This solution helped me npx nuxi@latest upgrade the script did its job and transferred the dependency "nuxt": "^3.12.3" to devDependencies from dependencies

farnabaz commented 6 days ago

Have you tried clean-install? (remove lockfile and node_modules and install deps again)

XStarlink commented 6 days ago

I've just done a local npx nuxi@latest upgrade --force with the latest version of content installed before (v2.13.1), and I don't seem to get the error anymore, it was probably a problem with dependencies that didn't update well.

Thank you very much @farnabaz for your advice (normally I always test this, sorry to have wasted your time...), maybe we can close the issue.

On the other hand now with the clean install (which I do with each new version of Nuxt), I get this from time to time in the dev server console, but it's not related to nuxt content sorry for the irrelevance:

 ERROR [unhandledRejection] write EPIPE 18:53:29

  at afterWriteDispatched (node:internal/stream_base_commons:161:15)
  at writeGeneric (node:internal/stream_base_commons:152:3)
  at Socket._writeGeneric (node:net:953:11)
  at Socket._write (node:net:965:8)
  at writeOrBuffer (node:internal/streams/writable:564:12)
  at _write (node:internal/streams/writable:493:10)
  at Writable.write (node:internal/streams/writable:502:10)
  at Socket.ondata (node:internal/streams/readable:1007:22)
  at Socket.emit (node:events:519:28)
  at addChunk (node:internal/streams/readable:559:12)

I'd already had it a few months ago, then it was gone, and now it's back.

CptJJ commented 6 days ago

Same issues on macOS; switching to node v18 didn't help me. I get this error, for example, when saving a mongoose schema or when changing files. I also had "@nuxt/content": "^2.13.1" installed, changing the version to "@nuxt/content": "^2.13.0" did not solve the problem.

Снимок экрана 2024-07-08 в 10 18 16

Same issue here started happening a few days ago and have been unable to chase it down.

Seems larger than nuxt/content? I get lots of vite errors when running pnpm install maybe its related

CleanShot 2024-07-09 at 12 02 00@2x

alexmercier25 commented 6 days ago

same issue here, also started happening a few days ago.

✔ Nuxt Nitro server built in 3080 ms                                                                                                    nitro 3:44:56 PM

 ERROR  [unhandledRejection] connect ECONNREFUSED 127.0.0.1:65146                                                                              3:44:56 PM

  at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16)

it happens everytime I make a change on the server folder.. Then I have to stop the server, remove the .nuxt folder and start the server again..

CptJJ commented 6 days ago

I fixed all the vite errors by install vite by itself via pnpm install vite... fixed HRM issue also. Paging in @danielroe this seems to be larger than nuxt content but related to modules?

narr07 commented 6 days ago

same issue


ERROR  [unhandledRejection] connect ECONNREFUSED 127.0.0.1:56891              10:22:35 AM

  at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) 
prostohttp commented 6 days ago

Guys, if you have https://marketplace.visualstudio.com/items?itemName=Nuxtr.nuxtr-vscode installed, then do not update any dependencies using it, after it I get an error again. Here's the solution

npx nuxi@latest upgrade

We are waiting for the new version of the extension

XStarlink commented 5 days ago

@CptJJ Indeed it must be something not related to nuxt/content and larger than that, because by updating some unrelated npm packets the problem came back...

I had to redo a nuxi upgrade -f to get the project working again, otherwise I was still getting these messages:

 ERROR [unhandledRejection] connect ECONNREFUSED 127.0.0.1:49363 18:49:19
  at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16)
chrisjansky commented 3 days ago

Not sure this will help anyone—I’ve been literally tearing my hair out these past 2 days over this inexplicable error and finally what seemed to have helped was reverting to nuxt@3.12.1 and @nuxt/content@2.13.0 (at least for the time being)

cossssmin commented 20 hours ago

Updating @nuxt/content from 2.13.0 to 2.13.1 resulted in no content page being generated. Netlify built successfully so I only caught it by chance, browsing the site and not seeing the content sections :( Reverted to 2.13.0 in the meantime.