onefinestay/react-daterange-picker

DateRange-Picker breaks the application

priverblack opened this issue · 0 comments

I just did the initial installation from the github page (npm install react-daterange-picker and after npm install --save @types/react-daterange-picker) and after th initial npm install it gives me a warning with npm WARN react-daterange-picker@2.0.1 requires a peer of moment-range@^3.0.3 but none is installed. You must install peer dependencies yourself.
When I already have the most updated version of moment-range in the project

And afterwards I just copied the code from github and did npm start and it gives me a blank page

Error(from console)
Uncaught TypeError: Object(...) is not a function at Module../node_modules/react-daterange-picker/src/moment-range.js (bundle.js:103437) at __webpack_require__ (bundle.js:727) at fn (bundle.js:101) at Object../node_modules/react-daterange-picker/dist/moment-range.js (bundle.js:102813) at __webpack_require__ (bundle.js:727) at fn (bundle.js:101) at Object../node_modules/react-daterange-picker/dist/DateRangePicker.js (bundle.js:101077) at __webpack_require__ (bundle.js:727) at fn (bundle.js:101) at Module.<anonymous> (bundle.js:4063)

Warning(from terminal)
WARNING in ./node_modules/react-daterange-picker/src/moment-range.js 3:15-27 "export 'extendMoment' was not found in 'moment-range' @ ./node_modules/react-daterange-picker/dist/moment-range.js @ ./node_modules/react-daterange-picker/dist/utils/getYearMonth.js @ ./node_modules/react-daterange-picker/dist/DateRangePicker.js

I'm using webpack@4.40.2 instead of the create-react-app