Installation command results in error

Author: onlyweiCreated Jan 3, 2023Updated Apr 11, 2024

react-dates version 21.8.0

Describe the bug Installation command results in error

Source code (including props configuration) Steps to reproduce the behavior:

  1. Execute npx create-react-app whatever_folder.
  2. cd whatever_folder
  3. Execute the command in the README:
% (
  export PKG=react-dates;
  npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g; s/ *//g' | xargs npm install --save "$PKG"
)

Screenshots/Gifs

bash
% (
  export PKG=react-dates;
  npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g; s/ *//g' | xargs npm install --save "$PKG"
)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from @testing-library/[email protected]
npm WARN   node_modules/@testing-library/react
npm WARN     @testing-library/react@"^13.4.0" from the root project
npm WARN   3 more (react-dom, react-scripts, the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.0.0" from @testing-library/[email protected]
npm WARN node_modules/@testing-library/react
npm WARN   @testing-library/react@"^13.4.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from @testing-library/[email protected]
npm WARN   node_modules/@testing-library/react
npm WARN     @testing-library/react@"^13.4.0" from the root project
npm WARN   3 more (react-dom, react-scripts, the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.2.0" from [email protected]
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^18.0.0" from @testing-library/[email protected]
npm WARN   node_modules/@testing-library/react
npm WARN   1 more (the root project)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react-dom
npm ERR!   peer react-dom@"^18.0.0" from @testing-library/[email protected]
npm ERR!   node_modules/@testing-library/react
npm ERR!     @testing-library/react@"^13.4.0" from the root project
npm ERR!   react-dom@"^0.14||^15.5.4||^16.1.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! react-dates@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react-dom
npm ERR!   peer react-dom@"^0.14 || ^15.5.4 || ^16.1.1" from [email protected]
npm ERR!   node_modules/react-dates
npm ERR!     react-dates@"*" 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! 

Desktop (please complete the following information):

  • OS: MacOS Ventura 13.1
  • Browser N/A

Is the issue reproducible in Storybook? N/A

Additional context Node version 18.12.1