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
- Install the SDK:
npm install @shipany/open-agent-sdk
- Run:
node cli.mjs (or node cli.mjs --bare)
- 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.
Environment
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
npm install @shipany/open-agent-sdknode cli.mjs(ornode cli.mjs --bare)Expected Behavior
CLI should start and accept user input.
Additional Context
AppStateProvidercomponent when it tries to calluseEffectEventuseEffectEventis not available in the main React module exports--bareflag - same errorPossible Cause
useEffectEventwas removed from React's public API in certain React 19 canary builds. The SDK bundles a definition ofuseEffectEventbutAppStateProvidercan't resolve it at runtime.