You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working through a custom project that uses webpack with npm, react, and babel to bundle my javascript code. I've been trying to use bokeh to include some analysis graphics in a React component, but I've been coming across an issue that seems to have been resolved in a create-react-app application with no help toward my current setup.
There are two issues here. One, the internal bokeh styling isn't being resolved for some reason, and two, even after specifying in my webpack configuration to transpile the bokeh package using the plugins specified in other issues, it is still unable to load.
The question really is am I missing something? Are there any intermediate steps to take other than installing bokeh using npm and bundling it with webpack?
Just for reference, here are my version numbers.
Node: 14.4.0
NPM: 6.14.5
@bokeh/bokehjs: 2.1.0
Webpack: 4.43.0
@babel/core: 7.9.0
All on Windows 10
The bug is recreated with both Firefox and Chrome.
Here is where that issue comes from.
import * as Bokeh from '@bokeh/bokehjs'
class BokehSample extends React.Component {
handlePlot1 = () => {
fetch('/plot1').then((resp) => Bokeh.embed.embed_item(resp.data, 'testPlot'))
}
The webpack configuration is pretty straight forward. I’m using css-loader and style-loader to load my css and the following code to transpile the package.
There are two issues. One is related to issue #10172, which was fixed in bokeh 2.1.1. The other is export * as syntax, that still may not be supported in babel, in which case you will need an extension of some sort (the solution seems to be in the linked discourse thread, but I didn't test that).
I've been working through a custom project that uses webpack with npm, react, and babel to bundle my javascript code. I've been trying to use bokeh to include some analysis graphics in a React component, but I've been coming across an issue that seems to have been resolved in a create-react-app application with no help toward my current setup.
That conversation can be found here.
https://discourse.bokeh.org/t/node12-import-error-bokeh-2-0/5061/10
Stack Trace of my Issue
There are two issues here. One, the internal bokeh styling isn't being resolved for some reason, and two, even after specifying in my webpack configuration to transpile the bokeh package using the plugins specified in other issues, it is still unable to load.
The question really is am I missing something? Are there any intermediate steps to take other than installing bokeh using npm and bundling it with webpack?
Just for reference, here are my version numbers.
Node: 14.4.0
NPM: 6.14.5
@bokeh/bokehjs: 2.1.0
Webpack: 4.43.0
@babel/core: 7.9.0
All on Windows 10
The bug is recreated with both Firefox and Chrome.
Here is where that issue comes from.
The webpack configuration is pretty straight forward. I’m using css-loader and style-loader to load my css and the following code to transpile the package.
Any help on this is greatly appreciated.
This issue is linked to a conversation started in the link below.
https://discourse.bokeh.org/t/using-bokeh-bokehjs-with-node-and-webpack/5818
The text was updated successfully, but these errors were encountered: