Skip to content

Add React to peer dependencies - #8

Merged
sindresorhus merged 1 commit into
sindresorhus:mainfrom
fym998:add-react-peer-dependency
May 29, 2026
Merged

Add React to peer dependencies#8
sindresorhus merged 1 commit into
sindresorhus:mainfrom
fym998:add-react-peer-dependency

Conversation

@fym998

@fym998 fym998 commented May 29, 2026

Copy link
Copy Markdown
Contributor

This package imports from react at runtime, but react is currently only listed in devDependencies.

With strict package managers such as pnpm, consumers can hit a runtime module resolution error when ink-gradient is installed as a transitive dependency:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'react' imported from .../ink-gradient/dist/index.js

This adds react to peerDependencies, matching the runtime import and Ink's own peer dependency requirement.

Verified with:

pnpm test

I also verified the consumer failure case locally by installing @vegamo/deepcode-cli in a temporary pnpm project and applying the same dependency metadata via packageExtensions. With react included in ink-gradient's peer dependency context, pnpm exec deepcode --help runs successfully.

@sindresorhus
sindresorhus merged commit 8b7f06d into sindresorhus:main May 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants