niivue / ipyniivue

A WebGL-powered Jupyter Widget for Niivue based on anywidget
BSD 2-Clause "Simplified" License
25 stars 8 forks source link

devDependency requirement on @jupyterlab/builder@^4.0.0 #32

Closed AnthonyAndroulakis closed 1 year ago

AnthonyAndroulakis commented 1 year ago

When running yarn run watch, the watch:labextension command fails (jupyter labextension watch .) with the following error:

Building extension in .
/usr/local/anaconda3/envs/ipyniivue-dev/lib/python3.11/site-packages/jupyterlab/debuglog.py:56: UserWarning: An error occurred.
  warnings.warn("An error occurred.")
/usr/local/anaconda3/envs/ipyniivue-dev/lib/python3.11/site-packages/jupyterlab/debuglog.py:57: UserWarning: ValueError: Extensions require a devDependency on @jupyterlab/builder@^4.0.0, you have a dependency on 3.6.3
  warnings.warn(msg[-1].strip())
/usr/local/anaconda3/envs/ipyniivue-dev/lib/python3.11/site-packages/jupyterlab/debuglog.py:58: UserWarning: See the log file for details: /var/folders/hp/folder/T/jupyterlab-debug-zv28m1mq.log
  warnings.warn(f"See the log file for details: {log_path!s}")
ERROR: "watch:labextension" exited with 1.

Editing "@jupyterlab/builder": "^3.0.0", to "@jupyterlab/builder": "^4.0.0", in the package.json file resolves the error, without having to rerun yarn install. So, the "@jupyterlab/builder ^4.0.0" library isn't actually needed for the library to build.

Thus, one of the dependencies might have changed their requirements for @jupyterlab/builder in a recent update.

It's worth noting that editing "@jupyterlab/builder": "^3.0.0", to `"@jupyterlab/builder": "^4.0.0" breaks the pip install step. The widget requires the "@jupyterlab/builder ^3.0.0" to install.