Skip to content

TypeError: (0 , _nanoevents.createNanoEvents) is not a function #45

@karolis-sh

Description

@karolis-sh

Hi 👋

I'm trying use/test nanonevents in codesandbox (https://codesandbox.io/s/mutable-shape-8urc9?file=/src/index.js) and with create-react-app's jest, both environments don't work with the library out of the box.

As I understand some of the defaults don't work well with *.cjs file extension ("main": "index.cjs",). Maybe it's worth renaming the file to follow a more common extension?

FYI: Renaming index.cjs -> index.cjs.js and changing "main": "index.cjs", -> "main": "index.cjs.js", seems to fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions