Skip to content

Nuxt 5 nightly dev serves 500: impound blocks dev-close-sockets.mjs #1579

Description

@ywenhao

Environment

  • Linux
  • Node 24.21.0
  • pnpm 12.6.0
  • nuxt-nightly@5.0.0-29841792.9ceeba8c (Nitro 3.0.260903-beta, Vite 8.3.1)
  • Resolved CLI: @nuxt/cli-nightly@4.0.0-20260928-072145-54eebce

Minimal reproduction

package.json:

{
  "name": "nuxt5-cli-repro",
  "private": true,
  "type": "module",
  "scripts": { "dev": "nuxt dev" },
  "dependencies": {
    "nuxt": "npm:nuxt-nightly@5.0.0-29841792.9ceeba8c"
  }
}

nuxt.config.ts:

export default defineNuxtConfig({
  compatibilityDate: '2025-07-15'
})

app/app.vue:

<template>
  <NuxtWelcome />
</template>

Run pnpm install && CI=1 pnpm run dev, then request http://localhost:3000/.

Actual result

The CLI prints Ready, but the page returns HTTP 500. The dev log reports:

Error: This module cannot be imported in server runtime.
[importing `@nuxt/cli-nightly/runtime/dev-close-sockets.mjs` from `#nitro/virtual/plugins`]

Suggestions:
  - These are build-time only packages and cannot be used at runtime.

The error comes from impound through Vite's vite:import-analysis. The generated #nitro/virtual/plugins module imports @nuxt/cli-nightly/runtime/dev-close-sockets.mjs.

I reproduced this in a fresh temporary project with no Nuxt modules or application logic. It also occurred in an app with @nuxtjs/i18n, but i18n is not required to trigger it.

Expected result

nuxt dev should serve the minimal welcome page with HTTP 200.

Possibly related: #1570 added runtime/dev-close-sockets.mjs to the CLI. Its linked issue #1531 concerns shutdown, whereas this is a startup/server runtime import failure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions