BokehJS with snowpack: @bokeh.slickgrid.v2.4.4102.js' does not provide an export named 'Data'

I really like bokeh and have used it with/in python without issue and had great results however I would like to try using BokehJS in a javascript/React project using only BokehJS. Now for development purposes I’m using snowpack (a variation of webpack) and I’m relatively new to the javascript/node/npm ecosystem and I get the general idea behind webpack / snowpack but clearly doing something wrong.

I’m attempting to create a basic line plot and am trying to import BokehJS in my javascript file using import * as Bokeh from '@bokeh/bokehjs' however when I go to the webpage (which is blank and should only contain a plot) I get the following error:

Unhandled Runtime Error

Uncaught SyntaxError: The requested module ‘/_snowpack/pkg/@bokeh.slickgrid.v2.4.4102.js’ does not provide an export named ‘Data’

Source

http://localhost:8080/_snowpack/pkg/@bokeh/bokehjs.v2.4.2/common/bokeh-05686c2e.js [:16:26]

SyntaxError: The requested module ‘/_snowpack/pkg/@bokeh.slickgrid.v2.4.4102.js’ does not provide an export named ‘Data’

Any ideas why this is occurring and how to mitigate this?
According to official documentation I tried adding

packageOptions: {
namedExports: [’@bokeh/bokehjs’],
},
to snwopack.config.mjs however nothing changed.

I really would appreciate any and all help, Thank you!!

xref:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.