Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build JupyterLab extension if using both @jupyter-widgets/base and @jupyterlab/application #2634

Closed
timkpaine opened this issue Dec 3, 2019 · 4 comments
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.

Comments

@timkpaine
Copy link
Contributor

timkpaine commented Dec 3, 2019

This feels like a mismatch in phosphor versions, here is an example of errors i get:

TS2322: Type 'Token<IJupyterWidgetRegistry>' is not assignable to type 'Token<any>'.
  Types have separate declarations of a private property '_tokenStructuralPropertyT'.
Types of property 'title' are incompatible.
...
Types have separate declarations of a private property '_label'.

package.json

"@jupyter-widgets/base": "^2.0.2",
"@jupyterlab/application": "^1.2.1",

code:
https://github.com/timkpaine/perspective/blob/renderer/packages/perspective-jupyterlab/package.json#L34

yarn why @phosphor/widgets

yarn why v1.13.0
[1/4] 🤔  Why do we have the module "@phosphor/widgets"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "@phosphor/[email protected]"
info Has been hoisted to "@phosphor/widgets"
info Reasons this module exists
   - "workspace-aggregator-eb0f292a-8b0a-44c1-a7a9-746986d243aa" depends on it
   - Hoisted from "_project_#@finos#perspective-jupyterlab#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-phosphor#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-jupyterlab#@jupyterlab#application#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-jupyterlab#@phosphor#application#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-phosphor#@phosphor#default-theme#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-jupyterlab#@jupyterlab#application#@jupyterlab#apputils#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-jupyterlab#@jupyterlab#application#@jupyterlab#docregistry#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-jupyterlab#@jupyterlab#application#@jupyterlab#rendermime-interfaces#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-jupyterlab#@jupyterlab#application#@jupyterlab#rendermime#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-jupyterlab#@jupyterlab#application#@jupyterlab#ui-components#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-jupyterlab#@jupyterlab#application#@jupyterlab#docregistry#@jupyterlab#codeeditor#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-jupyterlab#@jupyterlab#application#@jupyterlab#docregistry#@jupyterlab#codemirror#@phosphor#widgets"
   - Hoisted from "_project_#@finos#perspective-jupyterlab#@jupyterlab#application#@jupyterlab#docregistry#@jupyterlab#codemirror#@jupyterlab#statusbar#@phosphor#widgets"
info Disk size without dependencies: "1.07MB"
info Disk size with unique dependencies: "2.27MB"
info Disk size with transitive dependencies: "2.38MB"
info Number of shared dependencies: 12
=> Found "@jupyter-widgets/base#@phosphor/[email protected]"
info This module exists because "_project_#@finos#perspective-jupyterlab#@jupyter-widgets#base" depends on it.
info Disk size without dependencies: "892KB"
info Disk size with unique dependencies: "2.07MB"
info Disk size with transitive dependencies: "2.18MB"
info Number of shared dependencies: 12
✨  Done in 0.92s.
@jasongrout
Copy link
Member

This may not solve the issue, but can you try using "@jupyter-widgets/base": "^1 || ^2.0.2", at https://github.com/timkpaine/perspective/blob/a2df999ec4934101da16ff2dbd919de2956ecc22/packages/perspective-jupyterlab/package.json#L34

@timkpaine
Copy link
Contributor Author

timkpaine commented Dec 3, 2019

@jasongrout im thinking its this typo https://github.com/timkpaine/perspective/blob/a2df999ec4934101da16ff2dbd919de2956ecc22/packages/perspective-jupyterlab/src/config/plugin.config.js#L33

we only had a dep on @jupyter-widgets, so we didnt notice that the external is @jupyterlab not @jupyter

testing now

@timkpaine
Copy link
Contributor Author

fml yep haha thanks!

@jasongrout
Copy link
Member

@jasongrout im thinking its this typo https://github.com/timkpaine/perspective/blob/a2df999ec4934101da16ff2dbd919de2956ecc22/packages/perspective-jupyterlab/src/config/plugin.config.js#L33

Yep, that would lead to something like this as well. Good job catching it.

@lock lock bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label May 21, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

2 participants