define is not defined in Cesium.js


I have two errors ....

Uncaught ReferenceError: define is not defined (in Cesium line 2)

and when i try to call the viwer ... i get this error:
init.js:1 Uncaught ReferenceError: Cesium is not defined

How can i resolv this ?

It’s hard to say from the information you provided, but I would check out the Getting Started tutorial which will hopefully help you resolve your issue:

I'm getting the same error when updating Cesium. This error came up when I upgraded to cesium 1.8 from an older version of cesium. My issue is likely very specific, I'll update this thread when I find a solution.

I fixed the issue by using the files found in the Build/Cesium folder rather than the the files from the Source folder.

Hi, can u be more specific?

When you’re loading Cesium into your html as a script you want to reference the file found at in the folder “build/Cesium/Cesium.js” not “source/Cesium.js”.

If you downloaded straight from their Github page you need to build it yourself, or download it from the blogpost on their website which comes pre-built.