Skip to content

Build errors with user-feedback example #15

@ucyo

Description

@ucyo

The user feedback example is not working out-of-the-box. It seems to be an import problem.

Reproduction of error

Building the following Dockerfile and running it causes an build error

FROM node:25-slim AS builder

RUN apt-get update -y && apt-get install git -y

WORKDIR /app

RUN git clone https://github.com/langfuse/langfuse-examples.git

WORKDIR /app/langfuse-examples/applications/user-feedback

RUN npm install

CMD ["npm", "run", "dev"]

Error

## Error Type
Build Error

## Error Message
Module not found: Can't resolve '@/lib/utils'

## Build Output
./components/ai-elements/branch.tsx:4:1
Module not found: Can't resolve '@/lib/utils'
  2 |
  3 | import { Button } from "@/components/ui/button";
> 4 | import { cn } from "@/lib/utils";
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5 | import type { UIMessage } from "ai";
  6 | import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
  7 | import type { ComponentProps, HTMLAttributes, ReactElement } from "react";

Import map: aliased to relative './lib/utils' inside of [project]/

Import traces:
  Client Component Browser:
    ./components/ai-elements/branch.tsx [Client Component Browser]
    ./app/page.tsx [Client Component Browser]
    ./app/page.tsx [Server Component]

  Client Component SSR:
    ./components/ai-elements/branch.tsx [Client Component SSR]
    ./app/page.tsx [Client Component SSR]
    ./app/page.tsx [Server Component]

https://nextjs.org/docs/messages/module-not-found

Next.js version: 16.0.1 (Turbopack)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions