Skip to content

[bug]: In Nextjs 15.0.1 using BlocksRenderer error console Specified module format (CommonJs) is not matching the module format of the source code (EcmaScript Modules) #49

Closed
@Rmoreno3

Description

@Rmoreno3

What version of @strapi/blocks-react-renderer are you using?

Npm version 10.8.2
Node.Js 20.18.0
React 18.3.1
@strapi/blocks-react-render 1.0.1
Browser Google Chrome

What's Wrong?

I'm using Next.js 15.0.1 with React in its LTS version 18.3.1 along with Strapi as a CMS. The error I'm noticing is that after installing @strapi/blocks-react-render and importing it to use the component, I get an error in the Next.js console which tells me that the commonjs type cannot be used.

Captura de pantalla 2024-10-23 224549

To Reproduce

Install the package @strapi/blocks-react-render
import component and using

Expected Behaviour

I expected it to compile normally so I could get the information from the API to consume the JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions