---
title: "TS8071 CONSOLE_NOT_RECORDED: a TypeShade compiler error code"
description: "TS8071 CONSOLE_NOT_RECORDED, an error code of the TypeShade compiler. A warning under compile(src, { console: 'gpu' })…"
url: https://typeshade.dev/reference/errors/ts8071/
language: en
---

# `TS8071`

Front-end code `CONSOLE_NOT_RECORDED`

A warning under `compile(src, { console: 'gpu' })`: a `console` call that the WGSL does not record. The message gives the reason: a vertex entry reaches the call, an argument has no fixed size or is not a value, or the stage has no room for another storage buffer. The call still reaches the sink on the CPU ([Rule 11.9](https://typeshade.dev/reference/rules/11-9/)).

The registry has no documentation comment for this constant, so the line above is written by this site from the messages the compiler raises it with.

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

## Example

example.shade.ts

```ts
"use typeshade"

function lift(x: f32): f32 {
  console.log("x =", x)
  return x
}

@vertex
export function vs(vi: builtin<"vertex_index">): vec4 {
  return vec4(lift(f32(vi)), 0., 0., 1.)
}

@fragment
export function fs(p: builtin<"position">): vec4 {
  return vec4(p.x, 0., 0., 1.)
}
```

Compiled with `{ console: 'gpu' }`, the option under which the WGSL records console calls.

Compiled at build time against the pinned compiler, this program gets:

**TS8071** warning, line 4: This console.log() is not recorded on the GPU, because the vertex entry "vs" reaches it, and a vertex stage cannot write a storage buffer. It still reaches the sink when the function runs on the CPU.

## How to fix it

The same program, corrected. It compiles with no diagnostic.

example.shade.ts

```ts
"use typeshade"

function lift(x: f32): f32 {
  return x
}

@vertex
export function vs(vi: builtin<"vertex_index">): vec4 {
  return vec4(lift(f32(vi)), 0., 0., 1.)
}

@fragment
export function fs(p: builtin<"position">): vec4 {
  console.log("x =", p.x)
  return vec4(p.x, 0., 0., 1.)
}
```

## The rule this enforces

**[Rule 11.9](https://typeshade.dev/reference/rules/11-9/) Test**

A `console` call computes nothing a shader reads: its arguments must be evaluated once, in order, on every target, and the call then delivers an event, `{ method, args, span, invocation }`.

## See also

- [Error codes](https://typeshade.dev/reference/errors/)

## Source

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

- [`src/compiler/ts/compile.ts:286`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/compile.ts#L286)
