@wordpress/primitives
is missing a dependency on react
#62250
Labels
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
npm Packages
Related to npm packages
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
@wordpress/primitives
is lacking a dependency or peer dependency onreact
.This happens to work with
npm
's hoisting due to other dependencies pulling that package in, but will fail with yarn's p'n'p or pnpm with hoisting disabled.This seems to have begun with #61692.
Reproduction
With yarn:
echo '{}' > package.json
yarn set version stable
yarn add @wordpress/primitives
yarn node -e 'const x = require( "@wordpress/primitives" );'
With pnpm:
echo 'hoist-pattern=[]' > .npmrc
pnpm add @wordpress/primitives
(note pnpm 8 defaults to installing peer deps)node -e 'const x = require( "@wordpress/primitives" );'
Expected behavior
Command runs.
Actual behavior
With yarn:
With pnpm:
The text was updated successfully, but these errors were encountered: