JupyterLab doesn't have 'hub' tab

I’m trying to install the JupyterLab hub extension on a z2jh based hub I’m running. I am using the following command in my Dockerfile:

RUN jupyter labextension install \
            @jupyterlab/hub-extension \
            @jupyter-widgets/jupyterlab-manager \

Here’s output from the command run:

Node v8.12.0

> /usr/bin/npm pack @jupyterlab/hub-extension

npm notice
npm notice
 📦  @jupyterlab/hub-extension@0.12.0
notice === Tarball Contents ===
npm notice
 908B  package.json  
npm notice 1.5kB LICENSE       
npm notice 1.5kB README.md     
 notice 351B  lib/index.d.ts
notice 2.6kB lib/index.js  
 notice === Tarball Details ===
npm notice
 name:          @jupyterlab/hub-extension               
npm notice version:       0.12.0                                  
npm notice
 filename:      jupyterlab-hub-extension-0.12.0.tgz     
npm notice package size:  3.0 kB                                  
 notice unpacked size: 6.9 kB                                  
 notice shasum:        2928622d6b5dfd67b859948f08bf0cf8c55f5717
 notice integrity:     sha512-3iR402o7GNcyn[...]jCq3H+ROnFhkg==
 notice total files:   5                                       
Node v8.12.0

> /usr/bin/npm pack @jupyter-widgets/jupyterlab-manager

notice 📦  @jupyter-widgets/jupyterlab-manager@0.38.1
 notice === Tarball Contents ===
npm notice
 2.0kB package.json        
npm notice 1.5kB LICENSE             
npm notice 2.0kB README.md           
npm notice
 131B  lib/index.d.ts      
npm notice 410B  lib/index.js
npm notice 2.5kB lib/manager.d.ts
npm notice 6.2kB lib/manager.js      
 notice 1.9kB lib/output.d.ts     
 notice 6.0kB lib/output.js
npm notice 1.1kB lib/plugin.d.ts     
 notice 3.6kB lib/plugin.js
npm notice 829B  lib/renderer.d.ts
npm notice 3.0kB lib/renderer.js     
 notice 216B  lib/semvercache.d.ts
npm notice 972B  lib/semvercache.js
npm notice
 === Tarball Details ===
npm notice name:          @jupyter-widgets/jupyterlab-manager          
npm notice
 version:       0.38.1                                       
npm notice filename:      jupyter-widgets-jupyterlab-manager-0.38.1.tgz
 notice package size:  8.5 kB
npm notice unpacked size: 32.3 kB                                      
 notice shasum:        1b1e17c929065bd2a93057b2378562c10c3db6c0
npm notice integrity:     sha512-JutIwjs2jq6qW[...]Phr69YQ+qQZ/Q==     
 notice total files:   15                                           
Node v8.12.0

> /usr/bin/npm pack jupyter-matplotlib

npm notice

notice 📦  jupyter-matplotlib@0.3.0
npm notice === Tarball Contents ===
npm notice 889B    package.json        
npm notice 161B    README.md           
npm notice
 2.5kB   webpack.config.js   
npm notice 847.3kB dist/index.js       
npm notice 1.1MB   dist/index.js.map   
npm notice 455B    src/embed.js        
npm notice
 182B    src/index.js        
npm notice 434B    src/lab_extension.js
npm notice 5.6kB   src/mpl_widget.js   
notice 17.1kB  src/mpl.js          
npm notice 309B    src/nb_extension.js 
npm notice
 520B    src/nb_index.js     
npm notice === Tarball Details ===

npm notice name:          jupyter-matplotlib                      
npm notice version:       0.3.0
npm notice filename:      jupyter-matplotlib-0.3.0.tgz            
npm notice package size:  397.8 kB                                
npm notice
 unpacked size: 1.9 MB                                  
npm notice shasum:        35e71924ebecaf6926eaf52e92c7e206aecbae7f
npm notice
 integrity:     sha512-uJpU8dCeoRyqy[...]yiygnTrTTqNqg==
npm notice total files:   12                                      
npm notice

Node v8.12.0

> node /srv/app/venv/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install

yarn install v1.9.4
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning css-loader > cssnano > autoprefixer > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning css-loader > cssnano > postcss-merge-rules > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning css-loader > cssnano > postcss-merge-rules > caniuse-api > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
[3/5] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "@jupyterlab/vdom-extension > @nteract/transform-vdom@1.1.1" has incorrect peer dependency "react@^15.6.1".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 50.12s.
> node /srv/app/venv/lib/python3.6/site-packages/jupyterlab/staging/yarn.js run build

yarn run v1.9.4
$ webpack
Hash: 78a9c8a6d73b61e23d95
Version: webpack 4.12.2
Time: 17319ms
Built at: 2018-11-13 15:45:07
                                   Asset       Size        Chunks             Chunk Names
    vendors~vega.1e302f886dbe300cf0ef.js   2.76 MiB  vendors~vega  [emitted]  vendors~vega
    674f50d287a8c48dc19ba404d20fe713.eot    162 KiB                [emitted]  
    912ec66d7572ff821749319396470bde.svg    434 KiB                [emitted]  
   fee66e712a8a08eef5805a46892932ad.woff   95.7 KiB                [emitted]  
    b06871f281fee6b241d60582ae9369b9.ttf    162 KiB                [emitted]  
            main.8b140df581da5f150e74.js   56.1 KiB          main  [emitted]  main
               0.cc98107762fcc28532b3.js    4.5 KiB             0  [emitted]  
            vega.91b98e783d16fd1b9e23.js  519 bytes          vega  [emitted]  vega
    vendors~main.63322814e4e79526c9ae.js   10.5 MiB  vendors~main  [emitted]  vendors~main
  af7ae505a9eed503f8b8e6982036873e.woff2   75.4 KiB                [emitted]  
               1.055322dcf6c2bb19185f.js    888 KiB             1  [emitted]  
        main.8b140df581da5f150e74.js.map   65.5 KiB          main  [emitted]  main
           0.cc98107762fcc28532b3.js.map   5.73 KiB             0  [emitted]  
        vega.91b98e783d16fd1b9e23.js.map  251 bytes          vega  [emitted]  vega
vendors~main.63322814e4e79526c9ae.js.map   12.3 MiB  vendors~main  [emitted]  vendors~main
vendors~vega.1e302f886dbe300cf0ef.js.map   2.19 MiB  vendors~vega  [emitted]  vendors~vega
           1.055322dcf6c2bb19185f.js.map   1.04 MiB             1  [emitted]  
                              index.html   1.54 KiB                [emitted]  
Entrypoint main = vendors~main.63322814e4e79526c9ae.js vendors~main.63322814e4e79526c9ae.js.map main.8b140df581da5f150e74.js main.8b140df581da5f150e74.js.map
 [0] multi whatwg-fetch ./build/index.out.js 40 bytes {main} [built]
 [1] vertx (ignored) 15 bytes {main} [optional] [built]
 [4] buffer (ignored) 15 bytes {main} [optional] [built]
 [5] crypto (ignored) 15 bytes {main} [optional] [built]
 [6] readable-stream (ignored) 15 bytes {main} [built]
 [7] supports-color (ignored) 15 bytes {main} [built]
 [8] chalk (ignored) 15 bytes {main} [built]
 [9] fs (ignored) 15 bytes {main} [built]
[10] node-fetch (ignored) 15 bytes {vega} [built]
[11] fs (ignored) 15 bytes {vega} [built]
 [ANye] ./build/index.out.js 37.7 KiB {main} [built]
 [RnhZ] ./node_modules/moment/locale sync ^\.\/.*$ 2.88 KiB {main} [optional] [built]
 [YuTi] (webpack)/buildin/module.js 497 bytes {vendors~main} [built]
 [eTbV] ./node_modules/codemirror/mode sync ^\.\/.*\.js$ 2.78 KiB {0} [built]
 [yLpj] (webpack)/buildin/global.js 489 bytes {vendors~main} [built]
    + 2393 hidden modules

WARNING in jquery
  Multiple versions of jquery found:
    2.2.4 ./~/jupyter-matplotlib/~/jquery from ./~/jupyter-matplotlib/src/mpl_widget.js
    3.3.1 ./~/jquery from ./~/@jupyter-widgets/base/lib/widget.js

WARNING in vega-lite
  Multiple versions of vega-lite found:
    2.5.1 ./~/vega-lite/build/src from ./~/vega-lite/build/src/compile/selection/selection.js
    2.6.0 ./~/vega-lite/build from ./~/vega-lite/build/src/index.js

Check how you can resolve duplicate packages: 

Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
    [KTNU] ./node_modules/html-loader!./templates/partial.html 567 bytes {0} [built]
    [YuTi] (webpack)/buildin/module.js 497 bytes {0} [built]
    [aS2v] ./node_modules/html-webpack-plugin/lib/loader.js!./templates/template.html 1.22 KiB {0} [built]
    [yLpj] (webpack)/buildin/global.js 489 bytes {0} [built]
        + 1 hidden module
Done in 18.71s.

However, when launching, I see no Hub menu item in JupyterLab. Any idea what could be going wrong?

Have you set the command to launch to jupyter-labhub instead of jupyterhub-singleuser?

@minrk I have not, since IIRC it makes JupyterLab the default. We don’t want that quite yet.

Could you not use jupyter-labhub then set the default_url to '/user/{username}/tree'?

I’ll have to re-read to be sure, bu it’s possible that you must start with jupyter-labhub to get the functionality necessary. In which case @dhirshfeld’s suggest of overriding default_url ought to get you back to nbclassic by default.

Indeed, @dhirschfeld’s suggestion worked! I’d love for the extensions to not need to be launched with a special command though. I’ll open an issue!

Worth asking, but I’m not sure it’s feasible to deliver the necessary info to the front end without also including the backend extensions in the entry point.

I have set the default url correctly jupyter-labhub. Still this does not fix the issue.
I have installed extenion and enabled it but i do not see 'Hub’Tab on the dashboard

Hi @Rahil_Shaikh, in the intervening time, @jupyterlab/hub-extension has been absorbed into the core of the project, so you shouldn’t need to install any extensions to use it. The functionality is now available under the “File” menu.

1 Like