jupyterlab / extension-cookiecutter-ts

A cookiecutter recipe for JupyterLab extensions in Typescript
BSD 3-Clause "New" or "Revised" License
179 stars 88 forks source link

Error when running `pip install -e "."` on a 3.0 cookitcutter. #311

Closed ibdafna closed 1 year ago

ibdafna commented 1 year ago

I'm encountering an error when attempting installation of a 3.0 extension via the cookircutter. Steps to reproduce:

  1. cookiecutter https://github.com/jupyterlab/extension-cookiecutter-ts --checkout 3.0
  2. Fill out the form (I chose frontend)
  3. Run pip install -e "."

Error:

$ tsc --sourceMap
  node_modules/@jupyterlab/rendermime/lib/widgets.d.ts(8,31): error TS2420: Class 'RenderedCommon' incorrectly implements interface 'IRenderer'.
    The types of 'title.owner.layout' are incompatible between these types.
      Type 'import("/Users/idafna/nflx_jlab_notebooksearch/node_modules/@lumino/widgets/types/layout").Layout | null' is not assignable to type 'import("/Users/idafna/nflx_jlab_notebooksearch/node_modules/@jupyterlab/rendermime-interfaces/node_modules/@lumino/widgets/types/layout").Layout | null'.
        Type 'import("/Users/idafna/nflx_jlab_notebooksearch/node_modules/@lumino/widgets/types/layout").Layout' is not assignable to type 'import("/Users/idafna/nflx_jlab_notebooksearch/node_modules/@jupyterlab/rendermime-interfaces/node_modules/@lumino/widgets/types/layout").Layout'.
          Property '[Symbol.iterator]' is missing in type 'import("/Users/idafna/nflx_jlab_notebooksearch/node_modules/@lumino/widgets/types/layout").Layout' but required in type 'import("/Users/idafna/nflx_jlab_notebooksearch/node_modules/@jupyterlab/rendermime-interfaces/node_modules/@lumino/widgets/types/layout").Layout'.

Conda list:

➜ m list
List of packages in environment: "/Users/idafna/micromamba/envs/nflx_jlab_notebooksearch"

  Name                           Version      Build               Channel
───────────────────────────────────────────────────────────────────────────────
  aiofiles                       22.1.0       pyhd8ed1ab_0        conda-forge
  aiosqlite                      0.19.0       pyhd8ed1ab_0        conda-forge
  anyio                          3.7.0        pyhd8ed1ab_1        conda-forge
  appnope                        0.1.3        pyhd8ed1ab_0        conda-forge
  argon2-cffi                    21.3.0       pyhd8ed1ab_0        conda-forge
  argon2-cffi-bindings           21.2.0       py311he2be06e_3     conda-forge
  asttokens                      2.2.1        pyhd8ed1ab_0        conda-forge
  attrs                          23.1.0       pyh71513ae_1        conda-forge
  babel                          2.12.1       pyhd8ed1ab_1        conda-forge
  backcall                       0.2.0        pyh9f0ad1d_0        conda-forge
  backports                      1.0          pyhd8ed1ab_3        conda-forge
  backports.functools_lru_cache  1.6.4        pyhd8ed1ab_0        conda-forge
  beautifulsoup4                 4.12.2       pyha770c72_0        conda-forge
  bleach                         6.0.0        pyhd8ed1ab_0        conda-forge
  brotli                         1.0.9        h1a8c8d9_8          conda-forge
  brotli-bin                     1.0.9        h1a8c8d9_8          conda-forge
  bzip2                          1.0.8        h3422bc3_4          conda-forge
  ca-certificates                2023.5.7     hf0a4a13_0          conda-forge
  certifi                        2023.5.7     pyhd8ed1ab_0        conda-forge
  cffi                           1.15.1       py311hae827db_3     conda-forge
  charset-normalizer             3.1.0        pyhd8ed1ab_0        conda-forge
  comm                           0.1.3        pyhd8ed1ab_0        conda-forge
  debugpy                        1.6.7        py311ha397e9f_0     conda-forge
  decorator                      5.1.1        pyhd8ed1ab_0        conda-forge
  defusedxml                     0.7.1        pyhd8ed1ab_0        conda-forge
  entrypoints                    0.4          pyhd8ed1ab_0        conda-forge
  exceptiongroup                 1.1.1        pyhd8ed1ab_0        conda-forge
  executing                      1.2.0        pyhd8ed1ab_0        conda-forge
  flit-core                      3.9.0        pyhd8ed1ab_0        conda-forge
  icu                            72.1         he12128b_0          conda-forge
  idna                           3.4          pyhd8ed1ab_0        conda-forge
  importlib-metadata             6.6.0        pyha770c72_0        conda-forge
  importlib_metadata             6.6.0        hd8ed1ab_0          conda-forge
  importlib_resources            5.12.0       pyhd8ed1ab_0        conda-forge
  ipykernel                      6.23.1       pyh736e0ef_0        conda-forge
  ipython                        8.14.0       pyhd1c38e8_0        conda-forge
  ipython_genutils               0.2.0        py_1                conda-forge
  jedi                           0.18.2       pyhd8ed1ab_0        conda-forge
  jinja2                         3.1.2        pyhd8ed1ab_1        conda-forge
  json5                          0.9.5        pyh9f0ad1d_0        conda-forge
  jsonschema                     4.17.3       pyhd8ed1ab_0        conda-forge
  jupyter_client                 8.2.0        pyhd8ed1ab_0        conda-forge
  jupyter_core                   5.3.0        py311h267d04e_0     conda-forge
  jupyter_events                 0.6.3        pyhd8ed1ab_0        conda-forge
  jupyter_server                 2.6.0        pyhd8ed1ab_0        conda-forge
  jupyter_server_fileid          0.9.0        pyhd8ed1ab_0        conda-forge
  jupyter_server_terminals       0.4.4        pyhd8ed1ab_1        conda-forge
  jupyter_server_ydoc            0.8.0        pyhd8ed1ab_0        conda-forge
  jupyter_ydoc                   0.2.4        pyhd8ed1ab_0        conda-forge
  jupyterlab                     3.6.4        pyhd8ed1ab_0        conda-forge
  jupyterlab_pygments            0.2.2        pyhd8ed1ab_0        conda-forge
  jupyterlab_server              2.22.1       pyhd8ed1ab_0        conda-forge
  libbrotlicommon                1.0.9        h1a8c8d9_8          conda-forge
  libbrotlidec                   1.0.9        h1a8c8d9_8          conda-forge
  libbrotlienc                   1.0.9        h1a8c8d9_8          conda-forge
  libcxx                         16.0.4       h4653b0c_0          conda-forge
  libexpat                       2.5.0        hb7217d7_1          conda-forge
  libffi                         3.4.2        h3422bc3_5          conda-forge
  libsodium                      1.0.18       h27ca646_1          conda-forge
  libsqlite                      3.42.0       hb31c410_0          conda-forge
  libuv                          1.44.2       he4db4b2_0          conda-forge
  libzlib                        1.2.13       h03a7124_4          conda-forge
  markupsafe                     2.1.2        py311he2be06e_0     conda-forge
  matplotlib-inline              0.1.6        pyhd8ed1ab_0        conda-forge
  mistune                        2.0.5        pyhd8ed1ab_0        conda-forge
  nbclassic                      1.0.0        pyhb4ecaf3_1        conda-forge
  nbclient                       0.8.0        pyhd8ed1ab_0        conda-forge
  nbconvert                      7.4.0        pyhd8ed1ab_0        conda-forge
  nbconvert-core                 7.4.0        pyhd8ed1ab_0        conda-forge
  nbconvert-pandoc               7.4.0        pyhd8ed1ab_0        conda-forge
  nbformat                       5.9.0        pyhd8ed1ab_0        conda-forge
  ncurses                        6.3          h07bb92c_1          conda-forge
  nest-asyncio                   1.5.6        pyhd8ed1ab_0        conda-forge
  nodejs                         18.15.0      h7f372e8_1          conda-forge
  notebook                       6.5.4        pyha770c72_0        conda-forge
  notebook-shim                  0.2.3        pyhd8ed1ab_0        conda-forge
  openssl                        3.1.1        h53f4e23_1          conda-forge
  overrides                      7.3.1        pyhd8ed1ab_0        conda-forge
  packaging                      23.1         pyhd8ed1ab_0        conda-forge
  pandoc                         2.19.2       hce30654_2          conda-forge
  pandocfilters                  1.5.0        pyhd8ed1ab_0        conda-forge
  parso                          0.8.3        pyhd8ed1ab_0        conda-forge
  pexpect                        4.8.0        pyh1a96a4e_2        conda-forge
  pickleshare                    0.7.5        py_1003             conda-forge
  pip                            23.1.2       pyhd8ed1ab_0        conda-forge
  pkgutil-resolve-name           1.3.10       pyhd8ed1ab_0        conda-forge
  platformdirs                   3.5.1        pyhd8ed1ab_0        conda-forge
  prometheus_client              0.17.0       pyhd8ed1ab_0        conda-forge
  prompt-toolkit                 3.0.38       pyha770c72_0        conda-forge
  prompt_toolkit                 3.0.38       hd8ed1ab_0          conda-forge
  psutil                         5.9.5        py311he2be06e_0     conda-forge
  ptyprocess                     0.7.0        pyhd3deb0d_0        conda-forge
  pure_eval                      0.2.2        pyhd8ed1ab_0        conda-forge
  pycparser                      2.21         pyhd8ed1ab_0        conda-forge
  pygments                       2.15.1       pyhd8ed1ab_0        conda-forge
  pyobjc-core                    9.1.1        py311h490943d_0     conda-forge
  pyobjc-framework-cocoa         9.1.1        py311h490943d_0     conda-forge
  pyrsistent                     0.19.3       py311he2be06e_0     conda-forge
  pysocks                        1.7.1        pyha2e5f31_6        conda-forge
  python                         3.11.3       h1456518_0_cpython  conda-forge
  python-dateutil                2.8.2        pyhd8ed1ab_0        conda-forge
  python-fastjsonschema          2.17.1       pyhd8ed1ab_0        conda-forge
  python-json-logger             2.0.7        pyhd8ed1ab_0        conda-forge
  python_abi                     3.11         3_cp311             conda-forge
  pytz                           2023.3       pyhd8ed1ab_0        conda-forge
  pyyaml                         6.0          py311he2be06e_5     conda-forge
  pyzmq                          25.1.0       py311hb1af645_0     conda-forge
  readline                       8.2          h92ec313_1          conda-forge
  requests                       2.31.0       pyhd8ed1ab_0        conda-forge
  rfc3339-validator              0.1.4        pyhd8ed1ab_0        conda-forge
  rfc3986-validator              0.1.1        pyh9f0ad1d_0        conda-forge
  send2trash                     1.8.2        pyhd1c38e8_0        conda-forge
  setuptools                     67.7.2       pyhd8ed1ab_0        conda-forge
  six                            1.16.0       pyh6c4a22f_0        conda-forge
  sniffio                        1.3.0        pyhd8ed1ab_0        conda-forge
  soupsieve                      2.3.2.post1  pyhd8ed1ab_0        conda-forge
  stack_data                     0.6.2        pyhd8ed1ab_0        conda-forge
  terminado                      0.17.1       pyhd1c38e8_0        conda-forge
  tinycss2                       1.2.1        pyhd8ed1ab_0        conda-forge
  tk                             8.6.12       he1e0b03_0          conda-forge
  tomli                          2.0.1        pyhd8ed1ab_0        conda-forge
  tornado                        6.3.2        py311heffc1b2_0     conda-forge
  traitlets                      5.9.0        pyhd8ed1ab_0        conda-forge
  typing-extensions              4.6.3        hd8ed1ab_0          conda-forge
  typing_extensions              4.6.3        pyha770c72_0        conda-forge
  typing_utils                   0.1.0        pyhd8ed1ab_0        conda-forge
  tzdata                         2023c        h71feb2d_0          conda-forge
  urllib3                        2.0.2        pyhd8ed1ab_0        conda-forge
  wcwidth                        0.2.6        pyhd8ed1ab_0        conda-forge
  webencodings                   0.5.1        py_1                conda-forge
  websocket-client               1.5.2        pyhd8ed1ab_0        conda-forge
  wheel                          0.40.0       pyhd8ed1ab_0        conda-forge
  xz                             5.2.6        h57fd34a_0          conda-forge
  y-py                           0.5.9        py311heb423af_0     conda-forge
  yaml                           0.2.5        h3422bc3_2          conda-forge
  yarn                           3.6.0        h2a2186d_0          conda-forge
  ypy-websocket                  0.8.2        pyhd8ed1ab_0        conda-forge
  zeromq                         4.3.4        hbdafb3b_1          conda-forge
  zipp                           3.15.0       pyhd8ed1ab_0        conda-forge
  zlib                           1.2.13       h03a7124_4          conda-forge
welcome[bot] commented 1 year ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

ibdafna commented 1 year ago

Linked issue from the JLab repo: https://github.com/jupyterlab/jupyterlab/issues/14617

ibdafna commented 1 year ago

Although I am using JLab 3.6.4, the issue still persists. The fix I went with for now is to add the following explicit dependency to my extension directly:

"@jupyterlab/rendermime-interfaces": "~3.6.4"

fcollonval commented 1 year ago

This should be solved with the release of @jupyterlab/rendermime-interfaces 3.8.2 - it may require to clean your lock file to dedupe lumino packages.

fcollonval commented 1 year ago

Closing as fixed by the release of @jupyterlab/rendermime-interfaces. Please open a new issue if some errors remain.