Skip to content

[Bug]: Failed to Visualize Graph in the Frontend UI Due to Component Missing #2442

@Ao-Last

Description

@Ao-Last

Bug Description

The UI failed to show the graph visualization with frontend component missing error.

Steps to Reproduce

  1. Add knowledge to a dataset with cognee.add("Cognee is a knowledge database ingestion engine", dataset_name="my_knowledge_dataset")
  2. Start the UI by congnee-cli -ui, there is a dependency issue need to be solve as mentioned in COG-4329
  3. Open the UI in http://localhost:3000
  4. Click the three dots icon showing next to the dataset name and then click the visualize option available for the dataset.
  5. Get the error.

Expected Behavior

It shows the graph visualization.

Actual Behavior

Get a Next.js error.

Environment

  • OS: macos 26.3.1
  • Python version: 3.12
  • Cognee version: 0.5.5

Logs/Error Messages

## Error Type
Build Error

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

## Build Output
./src/app/visualize/[datasetId]/page.tsx:5:1
Module not found: Can't resolve '@/lib/adaptCogneeGraphData'
  3 | import { useEffect, useState } from "react";
  4 | import { fetch } from "@/utils";
> 5 | import { adaptCogneeGraphData, validateCogneeGraphResponse } from "@/lib/adaptCogneeGraphData";
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  6 | import { CogneeGraphResponse } from "@/types/CogneeAPI";
  7 | import MemoryGraphVisualization from "@/ui/elements/MemoryGraphVisualization";
  8 | import { Edge, Node } from "@/ui/rendering/graph/types";

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

Import traces:
  Client Component Browser:
    ./src/app/visualize/[datasetId]/page.tsx [Client Component Browser]
    ./src/app/visualize/[datasetId]/page.tsx [Server Component]

  Client Component SSR:
    ./src/app/visualize/[datasetId]/page.tsx [Client Component SSR]
    ./src/app/visualize/[datasetId]/page.tsx [Server Component]

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

Next.js version: 16.1.6 (Turbopack)

Additional Context

No response

Pre-submission Checklist

  • I have searched existing issues to ensure this bug hasn't been reported already
  • I have provided a clear and detailed description of the bug
  • I have included steps to reproduce the issue
  • I have included my environment details

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions