Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.
This repository was archived by the owner on May 19, 2025. It is now read-only.

(0 , _dateFns.addYears) is not a function #663

Activity

  1. kishanDoshi8 commented on Feb 10, 2025

    @kishanDoshi8

    +1

  2. xemlock commented on Mar 3, 2025

    @xemlock

    This happens because create-react-app doesn't support *.cjs files. So require('date-fns') returns a string (more specifically, a URL to a *.cjs file), instead of a JS module object. Hence the error.

    See react/create-react-app#12700 for a possible solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions