0

Please find the below error log which i got it in the browser:

AppComponent.html:1 ERROR TypeError: FlatBush is not a constructor at new SpatialIndex (vendor.js:90501) at AnnularWedgeView.push../node_modules/bokehjs/build/js/lib/models/glyphs/xy_glyph.js.XYGlyphView._index_data (vendor.js:104504) at AnnularWedgeView.push../node_modules/bokehjs/build/js/lib/models/glyphs/glyph.js.GlyphView.index_data (vendor.js:100363) at AnnularWedgeView.push../node_modules/bokehjs/build/js/lib/models/glyphs/glyph.js.GlyphView.set_data (vendor.js:100359) at GlyphRendererView.push../node_modules/bokehjs/build/js/lib/models/renderers/glyph_renderer.js.GlyphRendererView.set_data (vendor.js:109490) at GlyphRendererView.push../node_modules/bokehjs/build/js/lib/models/renderers/glyph_renderer.js.GlyphRendererView.initialize (vendor.js:109443) at GlyphRendererView.View [as constructor] (vendor.js:91313) at GlyphRendererView.DOMView [as constructor] (vendor.js:84742) at GlyphRendererView.RendererView [as constructor] (vendor.js:109915) at GlyphRendererView.DataRendererView [as constructor] (vendor.js:109336)

1 Answers1

0

(Adding some extra info here, I'm new to Bokehjs)

I'm having the same issue, using react with webpack.

import * as Bokeh from 'bokehjs'
// ...
Bokeh.embed.embed_item(data_from_backend)

Error:

ERROR TypeError: FlatBush is not a constructor at new SpatialIndex

Doing some debugging..

In node_modules/bokehjs/build/js/lib/core/util/spatial.js, changing this.index = new FlatBush(points.length); to this.index = new FlatBush.default(points.length); makes Bokehjs works.

According to this, I guess it's a module export issue.

kylo
  • 41
  • 1
  • 2