module-builder icon indicating copy to clipboard operation
module-builder copied to clipboard

Importing directly from module entry-points is not allowed.

Open sadlrxn opened this issue 5 months ago • 0 comments

error: “Importing directly from module entry-points is not allowed” when importing from @nuxt/ui

Description: I am encountering an intermittent error when importing types from @nuxt/ui. Sometimes the import works as expected, but other times it fails with the following message:

Importing directly from module entry-points is not allowed. [importing `@nuxt/ui` from]

Example code:

import { type FormSubmitEvent } from '@nuxt/ui'

Expected behavior: The import should consistently work without throwing this error. As documented on nuxt ui's site.

Actual behavior: The error appears sporadically, without clear cause.

Environment:

  • Nuxt version: [3.17.5]
  • @nuxt/ui version: [3.2.0]
  • Node.js version: [20]
  • OS: [Linux]

Additional context: The error does not always occur, making it difficult to reproduce reliably.

sadlrxn avatar Aug 06 '25 11:08 sadlrxn