question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Investigate ESM support in bokehjs' build

See original GitHub issue

Based on discussion in PR #8782.

TypeError: FlatBush is not a constructor

The underlying problem is that flatbush uses an experimental module field in its package.json to define the ES module entry point, along with the standard main field. webpack and similar linkers seem to prefer module over main, despite its non-standard nature. I will need to do proper research on this subject to decide whether this is a good idea for us to support the module field or not (currently I’m leaning towards the later, due to non-standard by default nature). One can fix this issue on the client side by setting up the linker (assuming webpack) with:

{ resolve: { mainFields: ['main', 'module'] } }

For rollup etc. similar configuration option should be hopefully possible.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
davegravycommented, May 1, 2019

I ran into this issue.

FWIW I use create-react-app and my (limited) understanding is that modifying webpack config isn’t possible without ‘ejecting’ the project (which I want to avoid for now). If there’s another solution I’m all ears.

1reaction
fbovecommented, Oct 17, 2019

I would need to get a reproducible example to decide if this is an issue or not.

A clean webpack project which uses bokehjs with sample data from Bokeh docs: https://github.com/fbove/bokehjs-example

Hope it helps!

Read more comments on GitHub >

github_iconTop Results From Across the Web

BokehJS and npm and embed_item() - Bokeh Discourse
I'm currently using BokehJS in my create-react-app by putting CDN links in ... See Investigate ESM support in bokehjs' build · Issue #8801 ......
Read more >
bokeh Changelog - pyup.io
8801 [component: bokehjs] [component: build] Investigate esm support in bokehjs' build - 8998 [component: build] Update conda recipe for 2.0
Read more >
ESM Compatible WASM package - SQLite Forum
JS build tools are also aware of this property and re-write it when targeting environments that don't support ES6 modules. i'm going to...
Read more >
Avoid these issues when using new ECMAScript modules in ...
Es6 modules now have full support in Node.js 12 and above so it's time ... and investigation to figure out when I was...
Read more >
Meta: Native support for ES Modules - Rysolv
I'll try to list which features Jest currently provides that are impacted by ESM support, and how we can solve/investigate them.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found