H3 · H30001

Replace exports removed in H3 v2

Flags imports and h3 namespace reads of the values and types H3 v2 removed, such as send(), sendError(), MIMES, and the App type.
H30001vite-doctor/h3migrationerrorSuggestion

Run this rule

pnpm vite-doctor . --rules h3/migration/no-removed-exports

Why it matters

H3 v2 no longer exports these names. Importing a removed value fails when the module loads, and importing a removed type fails the typecheck.

Use the replacement the H3 migration guide names, such as returning the value instead of send() or throwing an HTTPError instead of sendError().

Example

Return the response body

Before

import { defineHandler, send } from "h3"

export default defineHandler((event) => {
  return send(event, "ready")
})

After

import { defineHandler } from "h3"

export default defineHandler(() => {
  return "ready"
})

Type the app as H3

Before

import type { App } from "h3"

export function mount(app: App) {}

After

import type { H3 } from "h3"

export function mount(app: H3) {}
Copyright © 2026