Nitro · NITRO0014

Replace Nitro 2 package imports

Nitro 3 renamed the package and removed several Nitro 2 public subpaths.
NITRO0014vite-doctor/nitromigrationerrorSuggestion

Run this rule

pnpm vite-doctor . --framework nitro --rules nitro/migration/no-v2-imports

Why it matters

Nitro 3 publishes the nitro package and a smaller public export map, so Nitro 2 package names and removed subpaths no longer resolve.

Import from nitro and its documented Nitro 3 public subpaths. Use nitro/builder for the old builder entry points.

Example

Use the Nitro 3 package name

Before

import { defineNitroConfig } from "nitropack/config"

After

import { defineConfig } from "nitro"
Copyright © 2026