Error reference

Every Error thrown by @svgrid/grid or @svgrid/enterprise with the exact message text, the trigger condition, and the fix. If a runtime message you see isn't on this list, it's coming from your own code or a peer dependency.

How to read this page

Each entry has four pieces:

  1. Message - the exact text after Error:. Searchable.
  2. Class / type - the thrown object's .name.
  3. When - what action triggered it.
  4. Fix - the smallest change that resolves it.

Error classes are part of the API stability contract: the .name and message structure are Stable; we may reword the trailing detail at the patch level if the diagnostic improves.

@svgrid/grid

Error: SvGrid: cannot mount inside a non-element parent

Error: Column "<id>" has no field, fieldFn, or cell renderer

Error: Duplicate column id "<id>"

Error: Sort comparator failed: <reason>

RuneError: state_referenced_locally

each_key_duplicate

@svgrid/enterprise - License

Error: @svgrid/enterprise: setLicenseKey() requires a non-empty string

Error: @svgrid/enterprise: invalid license key format (expected "SVENTERPRISE-..." prefix).

Error: @svgrid/enterprise: this license key has been revoked. Contact [email protected] for a replacement.

@svgrid/enterprise - Export

Error: @svgrid/enterprise: export requires a browser environment

Error: @svgrid/enterprise: failed to load Smart.Utilities.DataExporter

Error: @svgrid/enterprise: xlsx export requires the "jszip" peer dependency. Install it with: pnpm add jszip

Error: @svgrid/enterprise: pdf export requires the "pdfmake" peer dependency. Install it with: pnpm add pdfmake

@svgrid/enterprise - Import

Error: @svgrid/enterprise: importData requires a browser environment

Error: @svgrid/enterprise: xlsx import requires the "jszip" peer dependency. Install it with: pnpm add jszip

Error: @svgrid/enterprise: xlsx import expects a File or Blob, not a string. Use format: "csv" or "tsv" for inline text.

Error: @svgrid/enterprise: could not locate sheet1.xml in the .xlsx archive

Error: @svgrid/enterprise: JSON import expects a top-level array

@svgrid/enterprise - AI

NoProviderError: @svgrid/grid ai: no AI provider registered. Call setAIProvider(fn) with an adapter that talks to OpenAI / Anthropic / your proxy.

BadJsonError: @svgrid/grid ai: provider returned non-JSON for a json-format request. First 200 chars: <prefix>

Error: @svgrid/grid ai: aiSmartFill requires at least one example.

How to report a missing entry

If you hit a thrown message that isn't on this page:

  1. Copy the exact message text and class name.
  2. File an issue with [error reference] in the title.
  3. We treat this list as canonical - every new error added in a release lands here in the same PR.

Try it

error replaces the grid body with a message; emptyMessage covers the no-rows case, which is a different state and deserves different words.

<SvGrid data={[]} {columns} emptyMessage="No people match this filter." />

<SvGrid data={[]} {columns} error="Could not reach the server. Retry in a moment." />

See also

The examples on this page run against these rows:

<script lang="ts">
  import { SvGrid, type GridColumns } from '@svgrid/grid'

  type Person = {
    id: number
    name: string
    department: string
    city: string
    age: number
    salary: number
  }

  const people: Person[] = [
    { id: 1, name: 'Ada Lovelace',   department: 'Engineering', city: 'London',   age: 36, salary: 142000 },
    { id: 2, name: 'Grace Hopper',   department: 'Engineering', city: 'New York', age: 45, salary: 168000 },
    { id: 3, name: 'Linus Torvalds', department: 'Platform',    city: 'Portland', age: 54, salary: 155000 },
    { id: 4, name: 'Radia Perlman',  department: 'Networking',  city: 'Seattle',  age: 49, salary: 161000 },
    { id: 5, name: 'Barbara Liskov', department: 'Platform',    city: 'Boston',   age: 52, salary: 172000 },
  ]

  let rows = $state<Person[]>(people)
  const data = people

  const columns: GridColumns<Person> = [
    { field: 'name',       header: 'Name',       width: 200 },
    { field: 'department', header: 'Department', width: 150 },
    { field: 'city',       header: 'City',       width: 140 },
    { field: 'age',        header: 'Age',        width: 90 },
    { field: 'salary',     header: 'Salary',     width: 130, format: { type: 'currency', currency: 'USD' } },
  ]
</script>

Related articles