Skip to content

warn: duplicate "useAppConfig" surfaced in Nuxt 4.4.2 / Nitro after unimport 6.1.0 #524

Closed

Description

@samiashi

Environment

  • Nuxt: 4.4.2
  • Nitro: 2.13.3
  • Node: 22.x
  • Package manager: npm
  • OS: macOS

Warning

After reinstalling dependencies, nuxt typecheck and dev startup started emitting:

WARN  Duplicated imports "useAppConfig", the one from "nitropack/runtime/internal/config" has been ignored and ".../@nuxt/nitro-server/dist/runtime/utils/app-config" is used

The app still runs, but the warning is repeated.

What changed

In our repo, the app-level Nuxt version did not change.

Relevant lockfile delta:

  • nuxt -> 4.4.2
  • @nuxt/nitro-server -> 4.4.2
  • nitropack -> 2.13.3
  • nested unimport changed 6.0.2 -> 6.1.0 under both nuxt and nitropack

Generated output showing the duplicate sources

Nuxt generates these entries:

// .nuxt/types/nitro-imports.d.ts
const useAppConfig: typeof import('../../node_modules/@nuxt/nitro-server/dist/runtime/utils/app-config').useAppConfig
const useRuntimeConfig: typeof import('../../node_modules/nitropack/dist/runtime/internal/config').useRuntimeConfig

export { useRuntimeConfig } from 'nitropack/runtime/internal/config'
export { useAppConfig } from '.../node_modules/@nuxt/nitro-server/dist/runtime/utils/app-config'

At the same time, Nitro also exports useAppConfig from nitropack/runtime/internal/config.

So the underlying duplicate source pair seems to exist in the Nuxt/Nitro integration, but unimport is the layer that emits the warning.

Why I'm filing here

[email protected] includes a rewrite of dedupeImports in:

That change looks like the most likely reason this duplicate is now being surfaced as a warning in setups that previously stayed quiet.

I'm not certain whether the root bug is:

  1. a Nuxt/Nitro duplicate that unimport now reports more aggressively, or
  2. a regression in unimport deduplication/warning behavior itself.

But the first visible change on our side was the nested unimport bump to 6.1.0, while [email protected] stayed fixed.

Reproduction notes

I can reproduce with:

npm install
npx nuxt typecheck

and also during dev startup.

Activity

  1. sfxcode commented on Apr 13, 2026

    @sfxcode

    It also prevents the overriden components in Nuxt Layers (4.4.2) to work correctly. Had to switch back to Version 6.0.2.

  2. isamudev commented on Apr 19, 2026

    @isamudev

    pnpm-workspace.yaml

    overrides:
      unimport: '6.0.2'
    
  3. antfu commented on Apr 22, 2026

    @antfu
    Member

    The fix is released as [email protected], update it or rebuild your lockfile should fix this

  4. piyushdolar commented on Apr 23, 2026

    @piyushdolar

    For nuxt users who are facing this warning can install this unimport: 6.1.1 under overrides inside the package.json to resolve it

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