Open JoryHogeveen opened 1 year ago
Tried to install cypress
and cypress-axe
to work on accessibility #7201, but failed to add new dependencies with npm.
brandon@MacBook-Air pods % npm install -D cypress cypress-axe
npm WARN config init.author.name Use `--init-author-name` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @wordpress/commands@0.7.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! peer react@"^17.0.0 || ^18.0.0" from @ariakit/react@0.2.12
npm ERR! node_modules/@ariakit/react
npm ERR! @ariakit/react@"^0.2.10" from @wordpress/components@25.2.0
npm ERR! node_modules/@wordpress/commands/node_modules/@wordpress/components
npm ERR! @wordpress/components@"^25.2.0" from @wordpress/commands@0.7.0
npm ERR! node_modules/@wordpress/commands
npm ERR! dev @wordpress/commands@"^0.7.0" from the root project
npm ERR! peer react@"^17.0.0 || ^18.0.0" from @ariakit/react-core@0.2.12
npm ERR! node_modules/@ariakit/react-core
npm ERR! @ariakit/react-core@"0.2.12" from @ariakit/react@0.2.12
npm ERR! node_modules/@ariakit/react
npm ERR! @ariakit/react@"^0.2.10" from @wordpress/components@25.2.0
npm ERR! node_modules/@wordpress/commands/node_modules/@wordpress/components
npm ERR! @wordpress/components@"^25.2.0" from @wordpress/commands@0.7.0
npm ERR! node_modules/@wordpress/commands
npm ERR! 121 more (@dnd-kit/accessibility, @dnd-kit/core, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.0.0" from @wordpress/commands@0.7.0
npm ERR! node_modules/@wordpress/commands
npm ERR! dev @wordpress/commands@"^0.7.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@18.2.0
npm ERR! node_modules/react
npm ERR! peer react@"^18.0.0" from @wordpress/commands@0.7.0
npm ERR! node_modules/@wordpress/commands
npm ERR! dev @wordpress/commands@"^0.7.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/brandon/.npm/_logs/2023-10-17T15_09_27_435Z-eresolve-report.txt
Description
Currently our package.json is quite large, might be best to check what dependencies are acturally required and what can be removed. For example,
lodash
is a large library which most of the time is only partially used. These functions can easily be replaced with our own functions that we can even optimize much more.Besides this our dependencies are conflicting, just did a full reinstall (see log below) We should update our dependencies and switch to React 18 just like WP already has.