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

date-fns wrong dependency in package.json #615

Open
shemadolev opened this issue Jul 23, 2023 · 1 comment
Open

date-fns wrong dependency in package.json #615

shemadolev opened this issue Jul 23, 2023 · 1 comment

Comments

@shemadolev
Copy link

Subject of the issue

date-fns should be in dependencies, otherwise apps won't start.

[BUG] Bug Reproduce Steps

  1. Install react-date-range without installing date-fns.
  2. Starting the app fails with an errors like:
    Module not found: Error: Can't resolve 'date-fns/max' in '[...]\node_modules\react-date-range\dist\components\Calendar'

[BUG] Expected behaviour

As this package uses date-fns (in Calendar for example), it should be a dependency and not a peerDependency, which will make npm installing this package also install the needed date-fns package.

Environment

Package Version: 1.4.0
React version: 17.0.2
Node version: 16.16.0

@shemadolev
Copy link
Author

Note - I'm locally resolving this issue by adding on my package.json the dependency of date-fns.

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

1 participant