Plotly FigureWidget() module error in Jupyter Lab

i am running the below simple sample code in Jupyter Lab:

import plotly.graph_objects as go

trace = go.Heatmap(z=[[1, 20, 30, 50, 1], [20, 1, 60, 80, 30], [30, 60, 1, -10, 20]],
                   x=['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
                   y=['Morning', 'Afternoon', 'Evening'])
data=[trace]
layout = go.Layout(title='Activity Heatmap')

figure = go.Figure(data=data, layout=layout)

f2 = go.FigureWidget(figure)
f2

in jupyter lab.
I got the error message “Error displaying widget: model not found”

Further debug in chrome shows the “module not registered as a widget module” error:

523.fa256ee012d38a89b65a.js:1 Error: Module jupyterlab-plotly, semver range ^5.2.2 is not registered as a widget module
    at x.loadClass (:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/523.fa256ee012d38a89b65a.js:1)
    at x.<anonymous> (:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/272.2a8425db7209008188fc.js:1)
    at :8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/272.2a8425db7209008188fc.js:1
    at Object.next (:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/272.2a8425db7209008188fc.js:1)
    at :8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/272.2a8425db7209008188fc.js:1
    at new Promise (<anonymous>)
    at S (:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/272.2a8425db7209008188fc.js:1)
    at x.e._make_model (:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/272.2a8425db7209008188fc.js:1)
    at x.<anonymous> (:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/272.2a8425db7209008188fc.js:1)
    at :8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/272.2a8425db7209008188fc.js:1

Conda list:

(py39) PS C:\repos\euler_python> conda list jupyter
# packages in environment at C:\Users\cocoj\.conda\envs\py39:
#
# Name                    Version                   Build  Channel
jupyter                   1.0.0            py39haa95532_7
jupyter-packaging         0.7.12             pyhd3eb1b0_0
jupyter_client            6.1.12             pyhd3eb1b0_0
jupyter_console           6.4.0              pyhd3eb1b0_0
jupyter_core              4.7.1            py39haa95532_0
jupyter_server            1.4.1            py39haa95532_0
jupyterlab                3.0.14             pyhd3eb1b0_1
jupyterlab_pygments       0.1.2                      py_0
jupyterlab_server         2.4.0              pyhd3eb1b0_0
jupyterlab_widgets        1.0.0              pyhd3eb1b0_1

jupyter labextension:


(py39) PS C:\repos\euler_python> jupyter labextension list
JupyterLab v3.0.14
C:\Users\cocoj\.conda\envs\py39\share\jupyter\labextensions
        jupyter-matplotlib v0.9.0 enabled ok
        jupyterlab-plotly v5.2.2 enabled ok
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled ok (python, jupyterlab_widgets)
        @voila-dashboards/jupyterlab-preview v2.0.2 enabled ok (python, voila)

Other labextensions (built into JupyterLab)
   app dir: C:\Users\cocoj\.conda\envs\py39\share\jupyter\lab
        ipyaggrid v0.2.1 enabled ok

nodejs: v 16.6.1
ipywidets v 7.6.3
plotly v 5.2.2
i have done the whole
jupyter lab update -all
jupyter lab build

no error message and everything should be most up-to-date.

the “standard” plotly.figure() works fine. just the figurewidget() does not work.

thanks