nuxt / nuxt

The Intuitive Vue Framework.
https://nuxt.com
MIT License
52.99k stars 4.86k forks source link

Development server keeps trying to reach localhost:24678 which doesn't exist #27907

Open therealokoro opened 2 days ago

therealokoro commented 2 days ago

Environment

Nuxt project info: 1:31:40 AM


Reproduction

[]( )

Describe the bug

I keep getting this error and log in the console every single time when running the development server of nuxt and I have absolutely know idea why.

Though it doesn't break the development server as one would think, but it's just so frustrating to see each time

Additional context

image image

Logs

No response

github-actions[bot] commented 2 days ago

Would you be able to provide a reproduction? 🙏

More info ### Why do I need to provide a reproduction? Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making. ### What will happen? If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect. If `needs reproduction` labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it. ### How can I create a reproduction? We have a couple of templates for starting with a minimal reproduction: 👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz 👉 https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox A public GitHub repository is also perfect. 👌 Please ensure that the reproduction is as **minimal** as possible. See more details [in our guide](https://nuxt.com/docs/community/reporting-bugs/#create-a-minimal-reproduction). You might also find these other articles interesting and/or helpful: - [The Importance of Reproductions](https://antfu.me/posts/why-reproductions-are-required) - [How to Generate a Minimal, Complete, and Verifiable Example](https://stackoverflow.com/help/minimal-reproducible-example)
martinszeltins commented 1 day ago

I just upgraded to Nuxt 3.12 and getting the same strange port. I thought the HMR port should be the same as the dev server port (3000).

On top of that, I am also seeing this strange error:

Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/@vue+devtools-core@7.3.5_vite@5.3.2_vue@3.4.31/node_modules/@vue/devtools-core/dist/index.js?v=abef60fd' does not provide an export named 'initAppSeparateWindow' (at overlay.mjs:2:10)

There seems to be a workaround by manually setting the vite HMR port to 3000. This fixes the problem. I have no idea why 3000 is not set by default.

server: {
    hmr: {
        clientPort: 3000
    },
},

image

------------------------------
- Operating System: Ubuntu 22.04.4 LTS
- Node Version:     v18.14.2
- Nuxt Version:     3.12.0-28587627.2d1ab61b
- CLI Version:      3.12.0
- Nitro Version:    2.10.0-28659787.86930878
- Package Manager:  pnpm@8.6.12
- Builder:          -
- User Config:      extends
- Runtime Modules:  -
- Build Modules:    -
------------------------------
martinszeltins commented 1 day ago

@danielroe Oh, I just noticed you asked for a reproduction, here it is. Best seen when running locally so I didn't put it on Stackblitz.

https://github.com/martinszeltins/nuxt-port-devtools-issue

There are 2 issues:

  1. client:732 GET http://localhost:24678/_nuxt/ net::ERR_CONNECTION_REFUSED
  2. Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/@vue+devtools-core@7.3.5_vite@5.3.2_vue@3.4.31/node_modules/@vue/devtools-core/dist/index.js?v=98b89a8d' does not provide an export named 'initAppSeparateWindow' (at overlay.mjs:2:10)

Screenshot: image

therealokoro commented 1 day ago

Thanks for the reproduction @martinszeltins. I add that. Good to see that i'm not the only one with the issue