Stack Trace

TypeError: Cannot read 'name' of undefined
greet(src/utils.ts:14:12)
handler(src/server.ts:42:8)
processRequest(src/api.ts:88:4)
About this piece

Stack Trace

Error headline followed by a few stack frames with file paths and amber line and column numbers.

Usage

The import and the props worth knowing about, in one place.

import { Code9 } from "@/components/beste/piece/code9";

<Code9
  error="TypeError: Cannot read 'name' of undefined"
  frames={[
    {
      "fn": "greet",
      "file": "src/utils.ts",
      "line": 14,
      "column": 12
    },
    {
      "fn": "handler",
      "file": "src/server.ts",
      "line": 42,
      "column": 8
    },
    {
      "fn": "processRequest",
      "file": "src/api.ts",
      "line": 88,
      "column": 4
    }
  ]}
  bordered={false}
/>

More Code pieces

View all Code
import{useState, useEffect}from"react";
import{Button}from"@/ui/button";
import{cn}from"@/lib/utils";
const greeting = "Hello, Beste!";ts
# Database
DATABASE_URL=postgres://localhost/beste
REDIS_URL=redis://localhost:6379
PORT=3000
pricing.ts
export function total(cart: Cart) {
const sum = cart.lines.reduce(add, 0)
return sum
const discount = coupon(cart, sum)
return sum - discount
}
{
"name":"Beste",
"active":true,
"count":42
}
function greet(name) {
return 'Hi ' + name;
return `Hello, ${name}!`;
}