ruvnet / ruvnet/agentic-flow

[Bug] agentic-flow@2.0.1-alpha.5 fails to load: bundled agentdb missing dist/controllers/index.js

Open
#80 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
812
Forks
175
Avg merge
2m
Merged PRs (30d)
3

Description

Bug Description

agentic-flow@2.0.1-alpha.5 fails to load when imported via require('agentic-flow') due to a missing compiled file in the bundled agentdb dependency.

Error Message

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/path/to/node_modules/agentic-flow/node_modules/agentdb/dist/controllers/index.js' imported from /path/to/node_modules/agentic-flow/dist/memory/SharedMemoryPool.js
    at finalizeResolution (node:internal/modules/esm/resolve:275:11)
    at moduleResolve (node:internal/modules/esm/resolve:932:10)
    at defaultResolve (node:internal/modules/esm/resolve:1056:11)

Root Cause

The bundled agentdb@2.0.0-alpha.2.20 inside node_modules/agentic-flow/node_modules/agentdb/ is missing the dist/controllers/index.js file.

What exists in agentdb/dist/:
agentdb.browser.js
agentdb.browser.js.map
agentdb.browser.min.js
agentdb.browser.min.js.map
agentdb.wasm-loader.js
schemas/
simulation/
src/          <- controllers/ exists here but NOT at dist/controllers/
What agentic-flow expects:
  • dist/controllers/index.js (missing)

The file agentic-flow/dist/memory/SharedMemoryPool.js imports from the bundled agentdb's dist/controllers/index.js, but that path doesn't exist in the published agentdb package.

Environment

  • agentic-flow version: 2.0.1-alpha.5
  • bundled agentdb version: 2.0.0-alpha.2.20
  • Node.js version: v22.13.1
  • OS: macOS (Darwin 25.1.0)

Steps to Reproduce

  1. Create a new project: npm init -y
  2. Install: npm install agentic-flow@alpha
  3. Try to import: node -e "require('agentic-flow')"

Expected Behavior

The package should load without errors.

Actual Behavior

Throws ERR_MODULE_NOT_FOUND for agentdb/dist/controllers/index.js.

Workaround

The CLI (npx agentic-flow --version) works fine. Only programmatic require() fails.

Suggested Fix

Either:

  1. Ensure agentdb publishes dist/controllers/index.js
  2. Or update SharedMemoryPool.ts import to use the correct path (dist/src/controllers/index.js)
  3. Or update agentdb's package.json exports to map the expected path

Additional Context

Installing agentdb@latest separately does not fix the issue because agentic-flow uses its own nested copy.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the listed npm install and require command, then inspect agentic-flow/dist/memory/SharedMemoryPool.js alongside the bundled agentdb package contents and exports. Compare the imported path with the files published under agentdb/dist and verify that a clean install can load agentic-flow programmatically without ERR_MODULE_NOT_FOUND.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.