Skip to content

## Bug: useEffectEvent is not a function error when running CLI #9

@jacklinna

Description

@jacklinna

Environment

  • Node.js: v20.18.0 (also tested with v24.12.0)
  • OS: Windows
  • SDK Version: 0.1.7
  • Package: @shipany/open-agent-sdk

Description

When running the CLI with node cli.mjs, the application crashes with the following error:
ERROR resolveDispatcher(…).useEffectEvent is not a function

file:///E:/github-code/open-sdk-code/node_modules/@shipany/open-agent-sdk/cli.mjs:121100:36

-process.env.NODE_ENV.exports2.useEffe (file:///E:/github-code/open-sdk-code/node_modules/@shipany/open-agent-sdk/cli.mjs:121100:36)

AppStateProvider (file:///E:/github-code/open-sdk-code/node_modules/@shipany/open-agent-sdk/cli.mjs:451509:62)
-react-stack-bottom-frame
(file:///E:/github-code/open-sdk-code/node_modules/@shipany/open-agent-sdk/cli.mjs:144712:20)

Steps to Reproduce

  1. Install the SDK: npm install @shipany/open-agent-sdk
  2. Run: node cli.mjs (or node cli.mjs --bare)
  3. Error occurs after initialization, before any user input

Expected Behavior

CLI should start and accept user input.

Additional Context

  • The error occurs in AppStateProvider component when it tries to call useEffectEvent
  • React 19.2.4 is installed, but useEffectEvent is not available in the main React module exports
  • Tried with Node.js v20.18.0 and v24.12.0 - same error on both
  • Tried with --bare flag - same error
  • This appears to be a React 19 + Ink (terminal UI library) compatibility issue

Possible Cause

useEffectEvent was removed from React's public API in certain React 19 canary builds. The SDK bundles a definition of useEffectEvent but AppStateProvider can't resolve it at runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions