react-admin-date-inputs icon indicating copy to clipboard operation
react-admin-date-inputs copied to clipboard

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

Open jormaechea opened this issue 6 years ago • 10 comments

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

jormaechea avatar Apr 03 '19 01:04 jormaechea

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)

JankesJanco avatar Apr 05 '19 12:04 JankesJanco

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.

ihrigb avatar Apr 12 '19 07:04 ihrigb

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]

capi1O avatar Apr 26 '19 10:04 capi1O

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

ihrigb avatar May 14 '19 18:05 ihrigb

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

esistgut avatar May 16 '19 23:05 esistgut

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

juliecaJulo avatar May 22 '19 11:05 juliecaJulo

@vascofg are you still giving support to this project?

jormaechea avatar Jun 11 '19 22:06 jormaechea

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.

vascofg avatar Oct 22 '19 18:10 vascofg

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

ihrigb avatar Oct 22 '19 20:10 ihrigb

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

myxit avatar May 21 '20 13:05 myxit