Module not found
See original GitHub issueHi @wojtekmaj I am having an issue with react-date-picker
where it is unable to resolve the react-calendar
module. I don’t know why it is happening. This is the first time I am facing this kind of issue.
Here is the complete error report:
React: 15.6
react-date-picker: 6.7.0
Error reported by webpack:
ERROR in ./node_modules/react-date-picker/dist/shared/locales.js [0] Module not found: Error: Can't resolve 'react-calendar/dist/shared/locales' in '/home/modestreet/modestreet-repo/webUI/node_modules/react-date-picker/dist/shared' [0] @ ./node_modules/react-date-picker/dist/shared/locales.js 7:15-60 [0] @ ./node_modules/react-date-picker/dist/DateInput.js [0] @ ./node_modules/react-date-picker/dist/DatePicker.js [0] @ ./node_modules/react-date-picker/dist/entry.js [0] @ ./src/components/addEditInfo/AddEditInfo.js [0] @ ./src/components/setupModule/SetupModule.js [0] @ ./src/components/index.js [0] @ ./src/services/routes.js [0] @ ./src/components/modeStreetRouter/modeStreetRouter.js [0] @ ./src/app.js [0] @ ./index.js
I found a similar issue related to this but it was closed due to inactivity. Although I have commented there as well. See https://github.com/wojtekmaj/react-date-picker/issues/11#issuecomment-420168268. Feel free to close this incase you decided to reopen that one. Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
You could add
"react-calendar": "2.11.0"
(mind the lack of^
) to yourpackage.json
and hopefully npm will dedupe it and won’t install two versions of react-calendar.@wojtekmaj thanks mate! 😄 You saved me a lot of time. Although I have some other calendar errors that might be because of invalid props I might be passing, but webpack has complied successfully. 👍