Unable to find solution – showing error in this way – "Attempted import error: 'date-fns' does not contain a default export (imported as 'dateFns')."

I’m new to reactjs.
I want to create a calendar which accepts an event for a particular date.
A small example can be found here

However, when I want to see the output, it outputs Attempted import error: 'date-fns' does not contain a default export (imported as 'dateFns').

Can anyone assist me here to resolve the error?

After importing in this way – import addMonths from ‘date-fns/addMonths*

I’m getting error as shown in snapshot. Snapshot

Can anybody help me in this?

32 thoughts on “Unable to find solution – showing error in this way – "Attempted import error: 'date-fns' does not contain a default export (imported as 'dateFns')."”

  1. Howdy! This is my first visit to your blog! We are a team of volunteers and starting
    a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a marvellous job!

    Reply
  2. It is the best time to make a few plans for the long run and it’s time to be happy.
    I’ve read this submit and if I may I want to counsel you few attention-grabbing issues or suggestions.
    Perhaps you could write subsequent articles
    regarding this article. I want to learn more things approximately it!

    Also visit my web page buy Instagram followers

    Reply
  3. Heya just wanted to give you a quick heads up and let you know a few of
    the pictures aren’t loading properly. I’m not
    sure why but I think its a linking issue. I’ve tried it in two
    different internet browsers and both show the same results.

    Stop by my homepage: delta 8 gummies

    Reply
  4. Hello there! This is my first visit to your blog!
    We are a collection of volunteers and starting a
    new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done
    a extraordinary job!

    Also visit my site … best kratom (Mitzi)

    Reply

Leave a Comment