Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React

Home Page:https://reactdatepicker.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't import the named export 'startOfWeek' from non EcmaScript module (only default export is available)

pd21 opened this issue · comments

Describe the bug
We created a repo using create-react-app with the below versions.
image

On using react-datepicker ( version 6.0.0 ) we are getting an error
image

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