datalayer/jupyter-ui

Support for Create React App for Jupyter-UI

Opened this issue · 3 comments

Description

I'm encountering the following issues while trying to use Jupyter UI in my Create React Application

image

And while installing the dependencies,the following error throws up:

Command: npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: @datalayer/jupyter-lexical-example@0.0.2        
npm ERR! Found: vite@5.3.1
npm ERR! node_modules/vite
npm ERR!   dev vite@"^5.2.7" from @datalayer/jupyter-lexical-example@0.0.2
npm ERR!   examples/lexical
npm ERR!     @datalayer/jupyter-lexical-example@0.0.2
npm ERR!     node_modules/@datalayer/jupyter-lexical-example
npm ERR!       workspace examples\lexical from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^2" from vite-plugin-replace@0.1.1
npm ERR! node_modules/vite-plugin-replace
npm ERR!   dev vite-plugin-replace@"^0.1.1" from @datalayer/jupyter-lexical-example@0.0.2        
npm ERR!   examples/lexical
npm ERR!     @datalayer/jupyter-lexical-example@0.0.2
npm ERR!     node_modules/@datalayer/jupyter-lexical-example
npm ERR!       workspace examples\lexical from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\xyz\AppData\Local\npm-cache\_logs\2024-06-23T10_58_57_044Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\xyz\AppData\Local\npm-cache\_logs\2024-06-23T10_58_57_044Z-debug-0.log

Kindly let me know how these errors could be resolved. cc @echarles

@datalayer/jupyter-lexical-example is not published in npm. If you want to depend on that, you would have to copy the source code in your src tree.

Is there any other way in which I could use Jupyter UI in a normal Create React App? @echarles
Could you provide the list of dependencies to be installed and the Sample code for making Jupyter Components work in a JS/TS file in a Create React App.