-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How to install peer dependencies in ipyreact? #20
Comments
The idea of ipyreact and (anywidget) is that you don't need to use npm/webpack (although you could generate a esm bundle probably). However, it's weird it does not work... I'm not sure the peer dependency matters for esm. |
Thanks for these insights! Three questions that might help in resolving this issue: |
It's getting them from esm.sh (watch your browser network tab to see them being downloaded on the fly) |
yeah, saw that as well, but that is probably not related, although seems like some kind of packaging issue in tldraw. |
Maybe it is not a solution, but you can check this out on https://esm.sh/#docs which can be used with Specify Dependencies
|
Note that React is already 'baked' in, because we need to run react. It's currently shipping with 18 only. |
@gergomiklos : Thanks a lot for pointing me to the docs! I also just discovered that they have a code playground at https://code.esm.sh/, that's great to reproduce errors! Regarding tldraw, this example works fine:
when I now try to change to the alpha version by changing the line - import { Tldraw } from "https://esm.sh/@tldraw/tldraw";
+ import { Tldraw } from "https://esm.sh/@tldraw/tldraw?deps=@tldraw/tldraw@alpha"; I still get the old version rendered, and not the latest alpha application. |
For jupyter-tldraw, I am currently using the old version 1 of tldraw, but now there is a new version 2.
The docs say I should install like this:
npm install @tldraw/tldraw@alpha signia signia-react
because tldraw v2 has peer dependencies on signia and signia-react.
I tried
import { Tldraw } from "@tldraw/tldraw@alpha";
but that did not work.
I got this error message in the console:
Does someone have an idea how I can get the signia and signia-react dependencies installed?
Here is the full example
The text was updated successfully, but these errors were encountered: