Customizing the Launcher for Jupyterlite


I’m trying to customize the launcher in Jupyterlite. To do so, I’m using the method used by Elyra and I’m reusing the same code (solution from here: jupyter lab - Customizing JupyterLab Launcher - Stack Overflow).

However, when launching Jupyterlite, I get the following error in the console:

index.ts:471 Error: Command 'launcher:create' already registered.
    at e.addCommand (index.ts:113:13)
    at activate (index.js:67:1)
    at index.ts:329:42

The error suggests that maybe I haven’t disabled the default launcher, but I believe I did:

$ jupyter labextension list;
JupyterLab v3.5.3
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        @custom/theme v0.1.0 enabled OK (python, custom-theme)
        @jupyterlite/pyodide-kernel-extension v0.1.3 enabled OK (python, jupyterlite_pyodide_kernel)
        @jupyterlite/javascript-kernel-extension v0.1.2 enabled OK

Disabled extensions:
    @jupyterlab/launcher-extension (all plugins)

So I’m wondering if there is something different with Jupyterlite that would prevent me to use the same method to customize the Launcher? Any insights would be helpful. If you have successfully customized the Launcher in Jupyterlite let us know.

You have disabled the extension in your current environment, not in jupyter-lite runtime environment. I think you need to use runtime config file jupyter-lite.json to define disabledExtensions. A config like:

  "jupyter-lite-schema-version": 0,
  "jupyter-config-data": {
    "disabledExtensions": ["@jupyterlab/launcher-extension"]

should work. This is my guess, I am entirely sure though!


Thank you @mahendrapaipuri. It was indeed the solution.

I’ve added the jupyter-lite.json file at the root of my directory and it’s automatically taken into account when building and serving Jupyterlite.

1 Like