Nuxt · Context

NUXT0021Use import.meta client/server flags

Flags process.client and process.server under Nuxt compatibility 5.

Why it happens

Nuxt compatibility 5 removes the Nuxt type augmentation for process flags, while import.meta.client and import.meta.server remain typed runtime constants.

Fix

Use import.meta.client or import.meta.server.

Example

Use import.meta client flags

Before

if (process.client) {
  hydrateChart()
}

After

if (import.meta.client) {
  hydrateChart()
}

Verify the fix

Run only this rule after editing so the report stays focused on the diagnostic you are closing:

pnpm nuxt doctor --rules nuxt/context/no-legacy-process-client-server
Copyright © 2026