Skip to content

Module not found: Can't resolve '@ag-ui/middleware-starter' #59

Open
@kongqy

Description

@kongqy

I want to run a demo.

  • Go to the ag-ui/typescript-sdk/apps/dojo directory and follow the readme document.
  • Execute pnpm install and pnpm run dev.
  • Browser Access http://localhost:3000 .
  • Then an exception occurred.
    • Console exception:
       ⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
       GET /server-starter/feature/agentic_chat 500 in 24ms
       GET /server-starter/feature/agentic_chat 200 in 12ms
       GET /server-starter/feature/agentic_chat 500 in 24ms
       ⨯ ./src/agents.ts:2:1
      Module not found: Can't resolve '@ag-ui/middleware-starter'
        1 | import { AgentIntegrationConfig } from "./types/integration";
      > 2 | import { MiddlewareStarterAgent } from "@ag-ui/middleware-starter";
          | ^
        3 | import { ServerStarterAgent } from "@ag-ui/server-starter";
        4 | import { ServerStarterAllFeaturesAgent } from "@ag-ui/server-starter-all-features";
        5 | import { MastraClient } from "@mastra/client-js";
      
      https://nextjs.org/docs/messages/module-not-found
      
      Import trace for requested module:
      ./src/app/api/copilotkit/[integrationId]/route.ts
       GET /_next/static/webpack/2c301618becf47be.webpack.hot-update.json 500 in 2118ms
       ⚠ Fast Refresh had to perform a full reload due to a runtime error.
       GET /server-starter/feature/agentic_chat 500 in 26ms
      <w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: ENOENT: no such file or directory, rename '/opt/work/CODE/ag-ui/typescript-sdk/apps/dojo/.next/cache/webpack/client-development-fallback/0.pack.gz_' -> '/opt/work/CODE/ag-ui/typescript-sdk/apps/dojo/.next/cache/webpack/client-development-fallback/0.pack.gz'
      
    • Browser page exception:

Image

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