Summary
Running the current CLI through pnpm fails before Expect starts, including for --version:
pnpm dlx expect-cli@latest --version
Minimal reproduction
From a fresh temporary directory:
mkdir expect-pnpm-repro
cd expect-pnpm-repro
pnpm dlx expect-cli@latest --version
Actual behavior
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'react' imported from
~/Library/pnpm/store/v11/links/@/ink-link/5.0.0/.../node_modules/ink-link/dist/index.js
Did you mean to import "react/jsx-runtime.js"?
The process exits before printing the Expect version or running init.
Expected behavior
pnpm dlx expect-cli@latest --version should print the installed CLI version and exit successfully.
Environment
- Expect CLI: 0.1.3
- pnpm: 11.21.0
- Node.js: 24.12.0
- macOS: 26.6.1
- Architecture: arm64
Investigation
expect-cli@0.1.3 declares both:
react: ^19.2.4
ink-link: ^5.0.0
However, ink-link@5.0.0 imports React while only declaring ink >=6 as a peer dependency. The isolated layout created by pnpm dlx therefore does not make React resolvable from ink-link.
A hoisted local installation works:
pnpm init --init-package-manager=false
pnpm add expect-cli@0.1.3 --config.node-linker=hoisted --ignore-scripts
pnpm exec expect-cli --version
# 0.1.3
This seems distinct from #26: that issue concerned init hanging while installing the skill, while this failure occurs before the CLI can start.
Possible resolution paths may be updating/replacing ink-link, or packaging Expect so React is resolvable from that dependency under pnpm's isolated dlx environment.
Summary
Running the current CLI through pnpm fails before Expect starts, including for
--version:Minimal reproduction
From a fresh temporary directory:
mkdir expect-pnpm-repro cd expect-pnpm-repro pnpm dlx expect-cli@latest --versionActual behavior
The process exits before printing the Expect version or running
init.Expected behavior
pnpm dlx expect-cli@latest --versionshould print the installed CLI version and exit successfully.Environment
Investigation
expect-cli@0.1.3declares both:However,
ink-link@5.0.0imports React while only declaringink >=6as a peer dependency. The isolated layout created bypnpm dlxtherefore does not make React resolvable fromink-link.A hoisted local installation works:
This seems distinct from #26: that issue concerned
inithanging while installing the skill, while this failure occurs before the CLI can start.Possible resolution paths may be updating/replacing
ink-link, or packaging Expect so React is resolvable from that dependency under pnpm's isolateddlxenvironment.