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

Module not found: Can't resolve 'date-fns/addDays' #30

Open
jormaechea opened this issue Apr 3, 2019 · 10 comments
Open

Module not found: Can't resolve 'date-fns/addDays' #30

jormaechea opened this issue Apr 3, 2019 · 10 comments

Comments

@jormaechea
Copy link

Just installed the library, and when I require the TimeInput, I get the following compile error:

Failed to compile
./node_modules/material-ui-pickers/utils/date-fns-utils.js
Module not found: Can't resolve 'date-fns/addDays' in '/var/www/football-rental/node_modules/material-ui-pickers/utils'
This error occurred during the build time and cannot be dismissed.

I even added date-fns to my package.json, but no luck.

I saw this error in a closed unrelated issue here: #15 (comment)

@JankesJanco
Copy link

I had the same issue and resolved it by adding date-fns and material-ui-pickers to package.json. (not sure if it is the right way how to deal with such error)

@ihrigb
Copy link
Collaborator

ihrigb commented Apr 12, 2019

I experience the same issue. Could be related to a version missmatch with date-fns.

I see ./node_module/date-fns/add_days instead of ./node_module/date-fns/addDays.

@capi1O
Copy link

capi1O commented Apr 26, 2019

react-admin-date-inputs (@1.1.2 or @1.0.21) dependencies :

  • "date-fns": "2.0.0-alpha.16",
  • "material-ui-pickers": "1.0.0-rc.17"

material-ui-pickers (1.0.0-rc.17) dev dependency :

  • "date-fns": "2.0.0-alpha.16"

but for some reason date-fns actually installed in node_modules : @1.30.1

fixed by npm i [email protected]

@ihrigb
Copy link
Collaborator

ihrigb commented May 14, 2019

I addressed this in a PR, but owner seems not to be interested in taking care of it.

@esistgut
Copy link

@vascofg can you please merge the PR and release a new version?

@juliecaJulo
Copy link

I also have the same issue. please take care of it as soon as possible

@jormaechea
Copy link
Author

@vascofg are you still giving support to this project?

@vascofg
Copy link
Owner

vascofg commented Oct 22, 2019

I merged an update to the dependencies.
I'm not working with react-admin anymore but will try to provide more updates in the future. If someone would like to join as a contributor let me know.

@ihrigb
Copy link
Collaborator

ihrigb commented Oct 22, 2019

Hi @vascofg
I'd be fine to join as a contributor. Maybe we can get shorter turnaround times on updates and pull requests.
BR,
Benjamin

@myxit
Copy link

myxit commented May 21, 2020

how is it going with updating?
component is extremely useful and it is sad having it not working out of the box

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

Successfully merging a pull request may close this issue.

8 participants