I’m trying to use Bokeh.js in my webpack project, and I’m getting the following messages when I try to import it:
WARNING in ./~/bokehjs/build/js/tree/index.js
26:17-30 Critical dependency: the request of a dependency is an expression
WARNING in ./~/root-require/index.js
16:8-72 Critical dependency: the request of a dependency is an expression
WARNING in ./~/bokehjs/build/js/tree/models/callbacks/customjs.js
28:90-97 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
WARNING in ./~/bokehjs/build/js/tree/models/formatters/func_tick_formatter.js
37:94-101 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
ERROR in ./~/packpath/lib/packpath.js
Module not found: Error: Can’t resolve ‘fs’ in ‘/home/user/dev/bokeh-require-test/node_modules/packpath/lib’
@ ./~/packpath/lib/packpath.js 1:9-22
@ ./~/root-require/index.js
@ ./~/bokehjs/build/js/tree/index.js
@ ./index.js
I’ve included a minimal self-contained example that you can clone here: https://gist.github.com/flaviut/18a1da4bad90c362fac664935c8225f6
The steps to reproduce are simply “npm install” to get the dependencies, and “webpack” to attempt to build the project. I’ve tried to delete the dependency on require-root in index.coffee, but to be totally honest, I have no idea how any of that works.
Thank you!
