title: How can I overcome "Error: Object 'jupyter.widget' not found in registry"?
body: <p>I am running jupyterlab within jupyterhub on kubernetes.</p>
  
  <p>I am trying to display widgets using e.g.</p>
  
  <pre class="lang-py prettyprint-override"><code>from ipywidgets import interact
  
  @interact(x=(0, 100, 10))
  def p(x=50):
      pass
  </code></pre>
  
  <p>Instead of the intended interactive widget, the lab notebook prints:</p>
  
  <pre><code>interactive(children=(IntSlider(value=50, description='x', step=10), Output()), _dom_classes=('widget-interact...
  </code></pre>
  
  <p>On inspection of the javascript console:</p>
  
  <pre><code>default.js:129 Error: Object 'jupyter.widget' not found in registry
      at default.js:1474
      at new Promise (&lt;anonymous&gt;)
      at Object.loadObject (default.js:1453)
      at DefaultKernel.&lt;anonymous&gt; (default.js:919)
      at Generator.next (&lt;anonymous&gt;)
      at default.js:9
      at new Promise (&lt;anonymous&gt;)
      at push.YC29.__awaiter (default.js:5)
      at DefaultKernel._handleCommOpen (default.js:911)
      at DefaultKernel.&lt;anonymous&gt; (default.js:1018)
  </code></pre>
  
  <p>I have tried many different combinations of:</p>
  
  <pre><code>!pip install ipywidgets
  !pip install widgetsnbextension --upgrade
  !pip install widgetslabextension --upgrade
  !conda install -n base -y --override-channels -c main -c conda-forge widgetsnbextension ipywidgets nodejs
  !jupyter nbextension enable --py widgetsnbextension
  !jupyter labextension enable widgetsnbextension
  !jupyter labextension list
  !jupyter labextension install @jupyter-widgets/jupyterlab-manager
  !jupyter lab clean
  !jupyter lab build
  !pip install --upgrade Nodejs
  !npm install -g npm yarn
  !jupyter serverextension enable --py jupyterlab --sys-prefix
  </code></pre>
  
  <p>jupyterlab is at 1.0.0 and jupyterlab-manager is at 1.0.</p>
  
  <p>Once everything is in order, how do I propagate changes?</p>
  
  <p>NB If I restart jupyterlab the container restarts and all changes are lost.</p>
  
  <p>I will do anything - print versions, pip freeze, run tests, reformat/reword this question.</p>
  
  <p>Does anyone have a remote clue how to resolve this?</p>
  
  <p>Please help!</p>
  
  <p>The following did not help:</p>
  
  <p><a href="https://stackoverflow.com/questions/49542417/how-to-get-ipywidgets-working-in-jupyter-lab">How to get ipywidgets working in Jupyter Lab?</a></p>
  
  <p><a href="https://ipywidgets.readthedocs.io/en/latest/user_install.html#installing-the-jupyterlab-extension" rel="noreferrer">https://ipywidgets.readthedocs.io/en/latest/user_install.html#installing-the-jupyterlab-extension</a></p>
  
  <p><a href="https://stackoverflow.com/questions/58631374/problem-displaying-widgets-ipywidgets-install-unsuccessful">Problem displaying widgets / ipywidgets install unsuccessful</a></p>
  
  <p><a href="https://github.com/jupyter-widgets/ipywidgets/issues/2220" rel="noreferrer">https://github.com/jupyter-widgets/ipywidgets/issues/2220</a></p>
  
  <p><a href="https://github.com/jupyter-widgets/ipywidgets/issues/2514" rel="noreferrer">https://github.com/jupyter-widgets/ipywidgets/issues/2514</a></p>
  
  <p><a href="https://github.com/jupyter-widgets/ipywidgets/issues/2483" rel="noreferrer">https://github.com/jupyter-widgets/ipywidgets/issues/2483</a></p>
  
  <p><a href="https://github.com/twosigma/beakerx/issues/7520" rel="noreferrer">https://github.com/twosigma/beakerx/issues/7520</a></p>
  
  <p><a href="https://github.com/jupyterlab/jupyterlab/issues/6998" rel="noreferrer">https://github.com/jupyterlab/jupyterlab/issues/6998</a></p>
  
  <p><a href="https://jupyterhub.readthedocs.io/en/stable/troubleshooting.html" rel="noreferrer">https://jupyterhub.readthedocs.io/en/stable/troubleshooting.html</a></p>
  
  <p><a href="https://github.com/jupyter-widgets/ipywidgets/issues/1949" rel="noreferrer">https://github.com/jupyter-widgets/ipywidgets/issues/1949</a></p>
  
  <p><a href="https://github.com/jupyter-widgets/ipywidgets/pull/1962" rel="noreferrer">https://github.com/jupyter-widgets/ipywidgets/pull/1962</a></p>