Build always recommended even after "jupyter lab build"

Hi,

I recently upgraded to JupyterLab 2.2.2 from 0.35. Since then I am getting a warning that a build is recommended. I updated to latest versions, but am still getting this warning as a popup in the web UI for all users.

Build Recommended

JupyterLab build is suggested:

@jupyterlab/application changed from ~2.2.1 to ~2.2.0
@jupyterlab/application-extension changed from ~2.2.1 to ~2.2.0
@jupyterlab/apputils-extension changed from ~2.2.1 to ~2.2.0
@jupyterlab/celltags-extension changed from ~2.2.1 to ~2.2.0
@jupyterlab/codemirror-extension changed from ~2.2.1 to ~2.2.0
@jupyterlab/completer-extension changed from ~2.2.1 to ~2.2.0
@jupyterlab/console-extension changed from ~2.2.1 to ~2.2.0
@jupyterlab/csvviewer-extension changed from ~2.2.1 to ~2.2.0
@jupyterlab/docmanager-extension changed from ~2.2.1 to ~2.2.0
@jupyterlab/documentsearch-extension changed from ~2.2.1 to ~2.2.0
...

Building comes back cleanly:

$ jupyter lab build
[LabBuildApp] JupyterLab 2.2.2
[LabBuildApp] Building in /usr/local/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets (build:prod:minimize)
$

And these are my installed versions of relevant packages: (should all be current)

jupyter                       1.0.0
jupyter-client                6.1.6
jupyter-console               6.1.0
jupyter-core                  4.6.3
jupyter-telemetry             0.1.0
jupyterhub                    1.1.0
jupyterlab                    2.2.2
jupyterlab-launcher           0.13.1
jupyterlab-server             1.2.0

If I look in /usr/local/share/jupyter/lab/static/package.json it has dependencies pegged at 2.2.1, so I’m not sure why the warnings are suggesting that npm plugins have reverted to v2.2.0? static/ assets are up to date judging by current mod times.

Does anyone know what is going on?

I’m running Ubuntu 16.04 with Python 3.8.

N.B. I saw a potentially related issue here, but it didn’t seem to solve my problem:

During the build, use the debug flag

jupyter lab clean --all
jupyter lab build --debug

and take note of which version of Python is being called to do the build. In my case, it had changed from Python 3.5 to 3.6. I removed the packages built with the newer Python version, force reinstalled with the original Python version, and then rebuilt Jupyter. Here are the commands, but you’ll need to change the Python version for your situation.

python3.6 -m pip uninstall jupyterlab
python3.6 -m pip uninstall jupyterhub
python3.5 -m pip install --force-reinstall jupyterlab
python3.5 -m pip install --force-reinstall jupyterhub
jupyter lab clean --all
jupyter lab build --debug

Good luck!

When running jupyter lab clean --all I got the following error:

[LabCleanApp] CRITICAL | Bad config encountered during initialization:
[LabCleanApp] CRITICAL | Unrecognized flag: ‘–all’