Can't import the named export 'startOfWeek' from non EcmaScript module (only default export is available)
pd21 opened this issue · comments
Priyanka commented
Describe the bug
We created a repo using create-react-app with the below versions.
On using react-datepicker ( version 6.0.0 ) we are getting an error
Note:
This error is not reproducible with react-datepicker: "6.0.0" , react-scripts: "^5.0.1"
This error is not reproducible with react-datepicker: "4.12.0"
To Reproduce
- npx create-react-app my-app
- Update the versions in package.json
"react": "^16.8.0",
"react-datepicker": "^6.0.0",
"react-dom": "^16.8.0",
"react-scripts": "^4.0.3", - Install react-datepicker library https://www.npmjs.com/package/react-datepicker
- Use the datepicker in App.js
Expected behavior
- npm run start should work withour any errors
Desktop (please complete the following information):
-
OS: [e.g. iOS]
-
Reproducible in chrome,firefox
-
Device
-
Windows