You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
createAgentDeviceClient is exported but unreachable from a project that uses agent-device via npx #2581
agent-device 0.21.0, Node 24.18. The README's Node client example (createAgentDeviceClient) is the API I wanted to build a two-platform visual regression loop on (callstack/react-native-paper#5115).
The package does export it (exports["."] → dist/src/index.js). But when agent-device is used the documented way, via npx agent-device …, the package lives only in the npx cache (~/.npm/_npx/<hash>/node_modules/agent-device), and import('agent-device') from a project fails with ERR_MODULE_NOT_FOUND. Reaching the typed client therefore requires adding agent-device as a (dev)dependency of the project under test, which a "try it without installing" evaluation cannot do. The fallback is spawning the CLI with --json per command and parsing stdout, which costs an npx resolution per call and loses every result type.
Suggestions: document the "use the Node client without installing" story if one exists (a global install, or a scaffold like npx agent-device init that writes a local wrapper), or say plainly in the README that the Node client requires a dependency and the CLI is the zero-install path.
Activity
thymikee commentedon Sep 14, 2026
You need to add agent-device as a dependency. It's how things work in JavaScript land