tscircuit SourceComponentMisconfiguredError: Invalid or Conflicting Component Configuration

Diagnostic signature

source_component_misconfigured_error

An error element produced within the tscircuit Circuit JSON tree when one or more source components are configured with invalid, conflicting, or mutually exclusive parameters.

What it means

In tscircuit's unified Circuit JSON specification, circuit data is organized across decoupled domains including the source domain, schematic layout domain, and PCB layout domain. A source_component_misconfigured_error represents an electronics compilation diagnostic raised at the source domain abstraction layer. It indicates that one or more source component elements (identified in source_component_ids) or their referenced connection ports (identified in source_port_ids) have parameter definitions or pin configurations that violate source domain integrity constraints or create contradictory circuit definitions.

Why it happens

The tscircuit compiler and circuit-json validation layers emit this diagnostic when evaluating component definitions that contain inconsistent metadata or conflicting port assignments. Typical causes include defining contradictory port declarations or pin mappings where internal connections conflict with specified port topologies, specifying mutually exclusive configuration attributes or malformed electrical parameters, referencing non-existent subcircuit scopes, or passing malformed source component payloads directly into circuit-json parsers where the component fails runtime Zod validation rules.

Minimal reproduction

import { source_component_misconfigured_error } from "circuit-json"

const errorData = {
  type: "source_component_misconfigured_error",
  source_component_misconfigured_error_id: "source_component_misconfigured_error_0",
  error_type: "source_component_misconfigured_error",
  source_component_ids: ["source_component_u1"],
  source_port_ids: ["source_port_1", "source_port_2"],
  message: "Source component U1 has an invalid or conflicting pin configuration"
}

const parsed = source_component_misconfigured_error.parse(errorData)
console.log(parsed.type)

How to fix it

Verify the configuration attributes, pin mappings, and port topology of the affected source components to resolve any conflicting parameters and ensure compliance with Circuit JSON requirements.

```typescript
import { source_component_base } from "circuit-json"

const validComponent = source_component_base.parse({
  type: "source_component",
  source_component_id: "source_component_u1",
  name: "U1",
  supplier_part_numbers: { lcsc: ["C2040"] }
})
console.log(validComponent.type)
```

Step 1

Step 2

Step 3

Step 4

Upstream references

circuit-json [email protected] — SourceComponentMisconfiguredError — retrieved 2026-08-11

circuit-json: source_component_misconfigured_error Schema Declaration