Investigate ESM support in bokehjs' build
See original GitHub issueBased 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:
- Created 4 years ago
- Reactions:5
- Comments:14 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
A clean webpack project which uses bokehjs with sample data from Bokeh docs: https://github.com/fbove/bokehjs-example
Hope it helps!