Closed petersg83 closed 5 years ago
I am experiencing this as well. Likely related to the breaking changed noted in the material-ui-pickers version 1.0.0 release notes:
-import MuiPickersUtilsProvider from 'material-ui-pickers/utils/MuiPickersUtilsProvider'
+import MuiPickersUtilsProvider from 'material-ui-pickers/MuiPickersUtilsProvider'
https://github.com/vascofg/react-admin-date-inputs/pull/16 It worked for me. Thx @tmcgee
Thanks! I think this is a similar issue, is this change published to npm yet? Which version of material-ui is everyone else using?
./node_modules/material-ui-pickers/utils/date-fns-utils/index.esm.js
Module not found: Can't resolve 'date-fns/addDays' in '~/Documents/<project>/node_modules/material-ui-pickers/utils/date-fns-utils'
@kent10ou
This might be related to yet-another-release of material-ui-pickers. Version 2.0.0 this time. From the release notes:
We have moved our utils to the separate monorepo (star it here) and for now do
-import Utils from 'material-ui-pickers/utils/date-fns-utils'
+import Utils from '@date-io/date-fns'
Here is where I think the change should occur. I haven't had the opportunity to verify/fix locally.
Hope this helps.
@vascofg : Any plan to release a new version on npm ?
watching this thread
Working on it now
@kent10ou
This might be related to yet-another-release of material-ui-pickers. Version 2.0.0 this time. From the release notes:
We have moved our utils to the separate monorepo (star it here) and for now do
-import Utils from 'material-ui-pickers/utils/date-fns-utils' +import Utils from '@date-io/date-fns'
Here is where I think the change should occur. I haven't had the opportunity to verify/fix locally.
Hope this helps.
Hey, unfortunately I won't be able to update to material-ui-pickers stable version since they decided to update to @material-ui/core@^3.2.0 and react-admin is still on @^1.4.0. This is causing some issues with the date-picker modal.
I'll try to publish a fixed version using the latest compatible material-ui-pickers version ASAP.
Fixed in 1.0.21
Hey @vascofg, I have the same error message, but it's not solved in 1.0.21.
"dependencies": {
"@material-ui/core": "^3.2.0",
"jwt-decode": "^2.2.0",
"material-ui-chip-input": "^0.19.0",
"ra-data-json-server": "^2.5.2",
"ra-data-simple-rest": "^2.5.2",
"react": "^16.7.0",
"react-admin": "^2.4.0",
"react-admin-date-inputs": "^1.0.21",
"react-dom": "^16.7.0",
"react-scripts": "2.1.2"
}
Is the version 1.0.21 compatible with the current version of @material-ui/core 3.2.0 ? Thanks
I'm getting very similar error message:
./node_modules/material-ui-pickers/utils/date-fns-utils.js`
`Module not found: Can't resolve 'date-fns/addDays' in '<project_dir>/node_modules/material-ui-pickers/utils'
with
"dependencies": {
"ra-data-simple-rest": "^2.5.3",
"react": "^16.7.0",
"react-admin": "^2.5.3",
"react-admin-date-inputs": "^1.0.21",
"react-dom": "^16.7.0",
"react-scripts": "2.1.3"
}
I'm getting the error too:
Module not found: Error: Can't resolve 'date-fns/addDays' in '/tmp/build_768d2570a4572a43a5b79af1cef23b51/admin/node_modules/material-ui-pickers/utils'
Upgrading to 1.0.21 didn't help.
Installing date-fns v2.0.0-alpha.7 manually did allow the app to build, but then I get weird visual bugs in the date picker, presumably due to breaking changes in version 2 of date-fns.
It seems error Can't resolve 'material-ui-pickers/utils/MuiPickersUtilsProvider'
is back.
May it be linked to the upgrade of material-ui-pickers
in PR #31?
An issue is open for this problem, see https://github.com/vascofg/react-admin-date-inputs/issues/37.
anyway since the author is not here, here is a fix deployed to npm
https://github.com/x5engine/react-admin-date-inputs
npm install react-admin-date-inputs2 --save
Just in case : If you still use react-admin v2.9, simply use the version 1.1.2 code you can easily find in commit history (1 file) and change the pickers import: import { MuiPickersUtilsProvider, DatePicker, TimePicker, DateTimePicker } from 'material-ui-pickers'; / import DatePicker from 'material-ui-pickers'; import TimePicker from 'material-ui-pickers'; import DateTimePicker from 'material-ui-pickers'; /
Hello,
I installed react-admin-dateinputs and I'm trying to use TimeInput but I have this error:
Module not found: Can't resolve 'material-ui-pickers/utils/MuiPickersUtilsProvider' in '/Users/pierre/Documents/schoolx/frontend/node_modules/react-admin-date-inputs/lib'
Here is my package.json:
I tried to install the module material-ui-pickers but it didn't change anything.
Do you have an idea of how I can make it work ? Thanks :)