---
title: "SD0006: component access on a non-vector in TypeShade"
description: "SD0006, an error code of the TypeShade compiler. component access on a non-vector"
url: https://typeshade.dev/reference/errors/sd0006/
language: en
---

# `SD0006`

Core code

component access on a non-vector

The registry text and every compiler message on these pages are the compiler's own English.

## In the front end

A `"use typeshade"` file never reaches this check with the same mistake: the front end refuses it first, under its own code. This program, compiled at build time, gets:

example.shade.ts

```ts
"use typeshade"

@fragment
export function main(uv: location<0, vec2>): vec4 {
  const s = uv.x
  return vec4(s.x, 0., 0., 1.)
}
```

**[TS8022](https://typeshade.dev/reference/errors/ts8022/)** error, line 6: .x on `f32` — swizzle requires `vec2`/`vec3`/`vec4`.

## See also

**[`TS8022`](https://typeshade.dev/reference/errors/ts8022/) `UNKNOWN_NAME`**

A reference to a name that TypeShade cannot resolve and that is not a function call (`UNKNOWN_FN`) or a type name (`UNKNOWN_TYPE`). A name that the library declares for TypeScript's own use (`Object`, `Math`, `Symbol`), or that the file declares as an enum, a namespace, a class or a type, and that is read as a value, says what it is.

- [Types](https://typeshade.dev/guide/language/types/)
- [`TypeShadeError`](https://typeshade.dev/api/typeshadeerror/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

Where the compiler raises this code at commit af54ddad5, one line per file:

- [`src/core/ir/node.ts:453`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L453)
