Uncaught Error: Dynamic require of "react" is not supported

I have this error:
chunk-KEXKKQVW.js?v=c8b35b4f:12 Uncaught Error: Dynamic require of “react” is not supported

Im building a project with React + Vite.

I have a blank page.

Hi @Daijard! CesiumJS does not require or import React, so I think this error relates to your application, to Vite, and to any build configuration you might have added. The cesium-vite-example template might be helpful, but you do not need to use that template, and could (for example) simply install CesiumJS in a project created from some other React/Vite template, then make similar changes to vite.config.js.

Yes, I solved when I stop trying to use Resium. After that I could run it.

1 Like