Skip to content

Cannot use import statement outside a module #1

Description

@DovahBrownies

I'm using the whole RSuite library in a NextJS project.
I also decided to use this well-structured library but it doesn't seem to load properly on server side.

On a server side render, I get the following error:
image

But on a client side render, it works perfectly.

This issue arises when I try to import the Validator:
import { Validator } from '@rsuite/validation'

Any advice?

Edit: I'm honored to be the first person to create an issue in this library 😆

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