datalayer / jupyter-ui

⚛️ React.js components 💯% compatible with 🪐 Jupyter - Storybook on https://jupyter-ui-storybook.datalayer.tech
https://jupyter-ui.datalayer.tech
Other
325 stars 46 forks source link

Node modules issue: @JupyterLab / @jupyter-widgets #42

Closed YassouEl closed 1 year ago

YassouEl commented 1 year ago

Description

Hi, I just cloned the project for a test and and im facing some errors with @jupyterlab and @jupyter-widgets node modules

Here is what I got as a result of the a npm run start Thank you!

Terminal Output
Failed to compile.

Module not found: Error: Package path ./mode is not exported from package /home/ghost/jupyter-react/examples/create-react-app/node_modules/codemirror (see exports field in /home/ghost/jupyter-react/examples/create-react-app/node_modules/codemirror/package.json)
ERROR in ./node_modules/@jupyter-widgets/html-manager/node_modules/@jupyterlab/codemirror/lib/mode.js 36:8-38:10
Module not found: Error: Package path ./mode is not exported from package /home/ghost/jupyter-react/examples/create-react-app/node_modules/codemirror (see exports field in /home/ghost/jupyter-react/examples/create-react-app/node_modules/codemirror/package.json)

ERROR in ./node_modules/@jupyter-widgets/jupyterlab-manager/node_modules/@jupyterlab/codemirror/lib/mode.js 36:8-38:10
Module not found: Error: Package path ./mode is not exported from package /home/ghost/jupyter-react/examples/create-react-app/node_modules/codemirror (see exports field in /home/ghost/jupyter-react/examples/create-react-app/node_modules/codemirror/package.json)

ERROR in ./node_modules/@jupyterlab/apputils/lib/kernelstatuses.js 62:18-33
export 'interactiveItem' (imported as 'interactiveItem') was not found in '@jupyterlab/statusbar' (possible exports: GroupItem, IStatusBar, Popup, ProgressBar, ProgressCircle, StatusBar, TextItem, showPopup)

ERROR in ./node_modules/@jupyterlab/apputils/lib/runningSessions.js 54:18-33
export 'interactiveItem' (imported as 'interactiveItem') was not found in '@jupyterlab/statusbar' (possible exports: GroupItem, IStatusBar, Popup, ProgressBar, ProgressCircle, StatusBar, TextItem, showPopup)

ERROR in ./node_modules/@jupyterlab/codemirror/lib/syntaxstatus.js 71:18-33
export 'interactiveItem' (imported as 'interactiveItem') was not found in '@jupyterlab/statusbar' (possible exports: GroupItem, IStatusBar, Popup, ProgressBar, ProgressCircle, StatusBar, TextItem, showPopup)

ERROR in ./node_modules/@jupyterlab/fileeditor/lib/tabspacestatus.js 32:18-33
export 'interactiveItem' (imported as 'interactiveItem') was not found in '@jupyterlab/statusbar' (possible exports: GroupItem, IStatusBar, Popup, ProgressBar, ProgressCircle, StatusBar, TextItem, showPopup)

ERROR in ./node_modules/@jupyterlab/fileeditor/lib/tabspacestatus.js 65:21-32
export 'clickedItem' (imported as 'clickedItem') was not found in '@jupyterlab/statusbar' (possible exports: GroupItem, IStatusBar, Popup, ProgressBar, ProgressCircle, StatusBar, TextItem, showPopup)

ERROR in ./node_modules/@jupyterlab/logconsole/node_modules/@jupyterlab/codemirror/lib/mode.js 36:8-38:10
Module not found: Error: Package path ./mode is not exported from package /home/ghost/jupyter-react/examples/create-react-app/node_modules/codemirror (see exports field in /home/ghost/jupyter-react/examples/create-react-app/node_modules/codemirror/package.json)

ERROR in ./node_modules/@jupyterlab/notebook/lib/executionindicator.js 85:18-33
export 'interactiveItem' (imported as 'interactiveItem') was not found in '@jupyterlab/statusbar' (possible exports: GroupItem, IStatusBar, Popup, ProgressBar, ProgressCircle, StatusBar, TextItem, showPopup)

webpack compiled with 9 errors
ERROR in src/examples/notebook/CellSidebarComponent.tsx:20:34
TS2352: Conversion of type 'Layout | null | undefined' to type 'PanelLayout' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Type 'Layout' is missing the following properties from type 'PanelLayout': widgets, iter, addWidget, insertWidget, and 5 more.
    18 |   const layout = notebook?.activeCell?.layout;
    19 |   if (layout) {
  > 20 |     const selectedCellSidebar = (notebook?.activeCell?.layout as PanelLayout).widgets[0];
       |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    21 |     if (!visible && (selectedCellSidebar.id === props.cellId)) {
    22 |       setVisible(true);
    23 |     }
echarles commented 1 year ago

Thx for reporting @YassouEl. I have just tried from a clean clone, and it works fine on my env. These are the commands I have run

git clone https://github.com/datalayer/jupyter-react.git && \
  cd jupyter-react && \
  yarn && \
  yarn build && \
  yarn start # open https://localhost:3208
echarles commented 1 year ago

Closing. Please reopen if you still have issues. Thx.