bokeh / jupyter_bokeh

An extension for rendering Bokeh content in JupyterLab notebooks
BSD 3-Clause "New" or "Revised" License
251 stars 48 forks source link

Jupyter lab extension failed to build. #127

Closed jiagengliu closed 3 years ago

jiagengliu commented 3 years ago

Thank you so much for providing the brilliant package.

After the most recent update, I am not able to build the Jupyter lab extension. Below are the error messages. I am using JupyterLab 3.0.12, Bokeh 2.3.0 on Python 3.8.5

Node v14.16.0

Yarn configuration loaded.
> /usr/bin/npm pack @bokeh/jupyter_bokeh
npm WARN deprecated @bokeh/jupyter_bokeh@3.0.0: Use pre-built pip or conda packages instead
npm notice 
npm notice 📦  @bokeh/jupyter_bokeh@3.0.0
npm notice === Tarball Contents === 
npm notice 0     style/base.css    
npm notice 25B   style/index.css   
npm notice 433B  lib/extension.js  
npm notice 91B   lib/index.js      
npm notice 471B  lib/manager.js    
npm notice 73B   lib/metadata.js   
npm notice 1.7kB lib/plugin.js     
npm notice 4.5kB lib/renderer.js   
npm notice 7.4kB lib/widgets.js    
npm notice 2.8kB package.json      
npm notice 3.5kB README.md         
npm notice 25B   lib/extension.d.ts
npm notice 91B   lib/index.d.ts    
npm notice 528B  lib/manager.d.ts  
npm notice 585B  lib/plugin.d.ts   
npm notice 1.3kB lib/renderer.d.ts 
npm notice 1.9kB lib/widgets.d.ts  
npm notice 1.5kB LICENSE.txt       
npm notice === Tarball Details === 
npm notice name:          @bokeh/jupyter_bokeh                    
npm notice version:       3.0.0                                   
npm notice filename:      bokeh-jupyter_bokeh-3.0.0.tgz           
npm notice package size:  8.2 kB                                  
npm notice unpacked size: 26.8 kB                                 
npm notice shasum:        2c7e701c04c596aabe4d08c3da9687699dd3f986
npm notice integrity:     sha512-iqhTsYYvSPatW[...]7HfcAM8C+3mgg==
npm notice total files:   18                                      
npm notice 
bokeh-jupyter_bokeh-3.0.0.tgz

Node v14.16.0

Yarn configuration loaded.
Building jupyterlab assets (production, minimized)
> node /home/ubuntu/.local/lib/python3.8/site-packages/jupyterlab/staging/yarn.js install --non-interactive
yarn install v1.21.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "@jupyterlab/extensionmanager > react-paginate@6.5.0" has incorrect peer dependency "react@^16.0.0".
warning "@jupyterlab/json-extension > react-highlighter@0.4.3" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@jupyterlab/json-extension > react-json-tree@0.12.1" has incorrect peer dependency "react@^16.3.0".
warning "@jupyterlab/json-extension > react-json-tree@0.12.1" has incorrect peer dependency "react-dom@^16.3.0".
warning "@jupyterlab/vdom > @nteract/transform-vdom@4.0.16-alpha.0" has incorrect peer dependency "react@^16.3.2".
warning " > @lumino/coreutils@1.5.3" has unmet peer dependency "crypto@1.0.1".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 2.46s.

> node /home/ubuntu/.local/lib/python3.8/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer --fail
yarn run v1.21.1
$ /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/.bin/yarn-deduplicate -s fewer --fail
Done in 0.23s.

> node /home/ubuntu/.local/lib/python3.8/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
yarn run v1.21.1
$ webpack --config webpack.prod.minimize.config.js
[webpack-cli] ModuleNotFoundError: Module not found: Error: Can't resolve '@bokeh/jupyter_bokeh/style/index.js' in '/home/ubuntu/.local/share/jupyter/lab/staging/build'
    at /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/webpack/lib/Compilation.js:1668:28
    at /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:712:13
    at eval (eval at create (/home/ubuntu/.local/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
    at /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:273:22
    at eval (eval at create (/home/ubuntu/.local/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:402:22
    at /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:117:11
    at /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:628:24
    at /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:782:8
    at /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:902:5
resolve '@bokeh/jupyter_bokeh/style/index.js' in '/home/ubuntu/.local/share/jupyter/lab/staging/build'
  Parsed request is a module
  using description file: /home/ubuntu/.local/share/jupyter/lab/staging/build/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      /home/ubuntu/.local/share/jupyter/lab/staging/build/node_modules doesn't exist or is not a directory
      looking for modules in /home/ubuntu/.local/share/jupyter/lab/staging/node_modules
        existing directory /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/@bokeh/jupyter_bokeh
          using description file: /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/@bokeh/jupyter_bokeh/package.json (relative path: .)
            using description file: /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/@bokeh/jupyter_bokeh/package.json (relative path: ./style/index.js)
              no extension
                Field 'browser' doesn't contain a valid alias configuration
                /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/@bokeh/jupyter_bokeh/style/index.js doesn't exist
              .js
                Field 'browser' doesn't contain a valid alias configuration
                /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/@bokeh/jupyter_bokeh/style/index.js.js doesn't exist
              .json
                Field 'browser' doesn't contain a valid alias configuration
                /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/@bokeh/jupyter_bokeh/style/index.js.json doesn't exist
              .wasm
                Field 'browser' doesn't contain a valid alias configuration
                /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/@bokeh/jupyter_bokeh/style/index.js.wasm doesn't exist
              as directory
                /home/ubuntu/.local/share/jupyter/lab/staging/node_modules/@bokeh/jupyter_bokeh/style/index.js doesn't exist
      /home/ubuntu/.local/share/jupyter/lab/node_modules doesn't exist or is not a directory
      /home/ubuntu/.local/share/jupyter/node_modules doesn't exist or is not a directory
      /home/ubuntu/.local/share/node_modules doesn't exist or is not a directory
      /home/ubuntu/.local/node_modules doesn't exist or is not a directory
      /home/ubuntu/node_modules doesn't exist or is not a directory
      /home/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

JupyterLab failed to build
Traceback (most recent call last):

  File "/home/ubuntu/.local/lib/python3.8/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

  File "/home/ubuntu/.local/lib/python3.8/site-packages/jupyterlab/labextensions.py", line 133, in start
    build(clean_staging=self.should_clean,

  File "/home/ubuntu/.local/lib/python3.8/site-packages/jupyterlab/commands.py", line 469, in build
    return handler.build(name=name, version=version, static_url=static_url,

  File "/home/ubuntu/.local/lib/python3.8/site-packages/jupyterlab/commands.py", line 678, in build
    raise RuntimeError(msg)

RuntimeError: JupyterLab failed to build

Exiting application: lab
bryevdv commented 3 years ago

@jiagengliu Starting with version 3.0 for Jupyterlab 3.0 we only support installing the pre-built extensions distributed by us as conda and pip packages.

pip install jupyter_bokeh

or

conda install -c conda-forge jupyter_bokeh
jiagengliu commented 3 years ago

Thank you so much for the prompt response! That was not even a minute.

bryevdv commented 3 years ago

I just happened to see it come by :)

jiagengliu commented 3 years ago

Hi! Thanks for the rapid response yesterday. I still have a problem. Matplotlib inline works in my Jupyterlab notebook, but not Bokeh (or Holoviews). I am using JupyterLab 3.0.12, Bokeh 2.3.0, Python 3.8.5 on Ubuntu 20.04. There is no particular output in Jupyter's command line, either. See the screenshot below. I wonder what might be the reason?

image