strapi / blocks-react-renderer

A React renderer for the Strapi's Blocks rich text editor
Other
162 stars 25 forks source link

[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 closed 2 weeks ago

Rmoreno3 commented 1 month ago

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.

macgbluedev commented 3 weeks ago

I have the same bug

Novailoveyou commented 2 weeks ago

Same

jovani-x commented 2 weeks ago

I have the same, but it runs normally without --turbo