Cesium 1.25+ won't display entities when using Browserify

Up to Cesium 1.24, using Browserify (plus the deAMDify transform) on the following code will correctly display the Wyoming polygon from the entity tutorial. From Cesium 1.25 to current (1.37), the same code will not display Wyoming, nor any additional entities added. Oddly, viewer.entities.values reflects the correct number of entities that should be displayed.

Any idea what's causing this? I see no errors, and both the map and imagery layers work fine.

const Color = require('cesium/Source/Core/Color');
const Cartesian3 = require('cesium/Source/Core/Cartesian3');
const SceneMode = require('cesium/Source/Scene/SceneMode');
const UrlTemplateImageryProvider = require('cesium/Source/Scene/UrlTemplateImageryProvider');
const Viewer = require('cesium/Source/Widgets/Viewer/Viewer');
const buildModuleUrl = require('cesium/Source/Core/buildModuleUrl');


let cesiumViewerOptions = {
  baseLayerPicker: false,
  imageryProvider: new UrlTemplateImageryProvider({url:"your_provider_here"})
const viewer = new Viewer('map', cesiumViewerOptions);

// EXAMPLE geometry: see Cesium's "Visualizing Spatial Data" tutorial
const wyoming = viewer.entities.add({
  name: "Wyoming",
  polygon: {
    hierarchy: Cartesian3.fromDegreesArray([
    height: 0,
    material: Color.RED.withAlpha(0.75),
    outline: true,
    outlineColor: Color.WHITE

console.log("# entities:", viewer.entities.values.length);

I'm using the latest Chrome browser. I may start looking at the changes between 1.24 and 1.25 to see if I can narrow this down, but unfortunately I'm tied to using Browserify rather than Webpack.

Does anyone have experience using Browserify with Cesium?

Hi Christopher,

Are you getting any output in the console if you open developer tools? It may be that the baseUrl may not be set correctly, which would mean you’d be getting errors about files not loading.

Our developers haven’t used Browserify at all as far as I know, but some community members have. If anyone has any input, please chime in!



Nope, the dev console is silent on the matter. I’ve even examined the objects in the viewer’s entities collection, and they seem correct.

On Behalf Of Gabby Getz

So it seems the problem is preventing only the geometry rendering, not the entity object construction themselves. My bet is that somehow the files in the Workers/ directory are not being loaded correctly, so they are not creating the geometry to be rendered. Sorry I can’t give you any more to go on.

Gabby, you're right, createGeometry is not being requested. Sorry, it turns out that I misidentified the issue. The real problem is Chrome running Cesium without a web server (but with disk-access allowed). At first I didn't think to test this difference, since the server merely mirrors the filesystem. I've started a new topic about the issue: