Skip to content

[BUG] Error: Module level directives cause errors when bundled, 'use client' was ignored #1037

Closed
@roelkoops

Description

@roelkoops

Hello! I'm using react-tooltip within my Mendix pluggable widget.
When I upgrade react-tooltip from 5.12.0 to 5.13.0 or 5.13.1 I'm no longer able to build my widget and I'm getting this error:

node_modules\react-tooltip\dist\react-tooltip.min.mjs (7:0) Error: Module level directives cause errors when bundled, 'use client' was ignored.5

I see that 'use client' is added in commit 0ae1c20 to prevent breaking Next.js 13 projects.
Any idea how to fix this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions