dmtrKovalenko / date-io

Abstraction over common javascript date management libraries
MIT License
723 stars 91 forks source link

Module not found: Can't resolve 'date-fns-jalali/addSeconds' #620

Closed amirtahmouresi closed 1 year ago

amirtahmouresi commented 2 years ago

I intended to use material ui jalali date picker in react, so based on documentation I installed @date-io/date-fns-jalali library but my app had compile errors like "Module not found: Can't resolve 'date-fns-jalali/addSeconds'". After spending a lot of time to fix the error I found the solution. When you install date-fns-jalali library using npm i @date-io/date-fns-jalali command, you need also install date-fns-jalali modules using npm install date-fns-jalali command. If the error is not resolved, you may also need install date-fns library and it's modules using npm i @date-io/date-fns date-fns command. good luck👍

flaviendelangle commented 2 years ago

I intended to use material ui jalali date picker in react, so based on documentation I installed @date-io/date-fns-jalali library but my app had compile errors like "Module not found: Can't resolve 'date-fns-jalali/addSeconds'". After spending a lot of time to fix the error I found the solution.

Could you link me the documentation you based your initial installation on ? If it was the MUI documentation and it was not clear, we have to improve it.

amirtahmouresi commented 1 year ago

I intended to use material ui jalali date picker in react, so based on documentation I installed @date-io/date-fns-jalali library but my app had compile errors like "Module not found: Can't resolve 'date-fns-jalali/addSeconds'". After spending a lot of time to fix the error I found the solution.

Could you link me the documentation you based your initial installation on ? If it was the MUI documentation and it was not clear, we have to improve it.

https://mui.com/x/react-date-pickers/date-picker/