Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation command results in error #2224

Open
onlywei opened this issue Jan 3, 2023 · 2 comments
Open

Installation command results in error #2224

onlywei opened this issue Jan 3, 2023 · 2 comments

Comments

@onlywei
Copy link

onlywei commented Jan 3, 2023

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

% (
  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: react-dates-focus-issue-repro@0.1.0
npm WARN Found: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from @testing-library/react@13.4.0
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/react@13.4.0
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: react-dates-focus-issue-repro@0.1.0
npm WARN Found: react@18.2.0
npm WARN node_modules/react
npm WARN   peer react@"^18.0.0" from @testing-library/react@13.4.0
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 react-dom@18.2.0
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^18.0.0" from @testing-library/react@13.4.0
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: react-dates-focus-issue-repro@0.1.0
npm ERR! Found: react-dom@18.2.0
npm ERR! node_modules/react-dom
npm ERR!   peer react-dom@"^18.0.0" from @testing-library/react@13.4.0
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: react-dom@16.14.0
npm ERR! node_modules/react-dom
npm ERR!   peer react-dom@"^0.14 || ^15.5.4 || ^16.1.1" from react-dates@21.8.0
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

@ljharb
Copy link
Member

ljharb commented Jan 3, 2023

That's because you have react 18, and react-dates doesn't yet support react 17+.

@aerialist7

This comment was marked as spam.

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

No branches or pull requests

3 participants