Module not found: Can't resolve 'date-fns/addDays'
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: https://github.com/vascofg/react-admin-date-inputs/issues/15#issuecomment-452923010
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)
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.
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]
I addressed this in a PR, but owner seems not to be interested in taking care of it.
@vascofg can you please merge the PR and release a new version?
I also have the same issue. please take care of it as soon as possible
@vascofg are you still giving support to this project?
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.
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
how is it going with updating? component is extremely useful and it is sad having it not working out of the box