installing into vite project #602
Replies: 7 comments 6 replies
-
Tried an alternative approach:
But this still failed:
|
Beta Was this translation helpful? Give feedback.
-
Hi @ilan-gold - Yes, I originally tried creating a Just now I've tried:
So then I tried the same again but with react 16.12
This looked good! So I added an But now I think I'm running into other issues with vite, maybe due to trying to use React in a
So I tried to start with a
I removed the
looking good... So I replaced the
So, maybe this is more of a |
Beta Was this translation helpful? Give feedback.
-
In the meantime I have been experimenting with vanilla JS to render data from zarr.js to a canvas for smallish images/thumbnails. See https://ome-ngff-validator.netlify.app/?source=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.3/9836842.zarr |
Beta Was this translation helpful? Give feedback.
-
In general I think our specification of peer dependencies causes a lot of issues for initial installs (and our requirements for react/react-dom are too strict and outdated). For a clean project I tried:
and it seemed to work. If an issue persists, it might be due to: visgl/deck.gl#6906, which you'll need to pin a version of |
Beta Was this translation helpful? Give feedback.
-
Looked at this today. The primary issue is react as a peer dependency. npm create vite viv-app # select react
cd viv-app
npm install react@16 react-dom@16 @types/@react@16 @types/react-dom@16 # downgrade react
npm install @hms-dbmi/viv # peer deps automatically with npm >=v7 and then in - import ReactDOM from 'react-dom/client'
+ import ReactDOM from 'react-dom'
- ReactDOM.createRoot(document.getElementById('root')).render(
- <React.StrictMode>
- <App />
- </React.StrictMode>
- )
+ ReactDOM.render(
+ <React.StrictMode>
+ <App />
+ </React.StrictMode>,
+ document.getElementById('root')
+ ) We should hopefully be able to support latest create-vite soon! |
Beta Was this translation helpful? Give feedback.
-
Just getting back to this again... I followed those pointers (thanks) and managed to get the viv-react app running. I see that the I also created a vanilla-Js version of the same app, which also has exactly the same issue: Any idea what I'm missing in either of these examples? Many thanks! |
Beta Was this translation helpful? Give feedback.
-
Thanks @ilan-gold - |
Beta Was this translation helpful? Give feedback.
-
So I wanted to install
viv
in a newvite
project to have a play & learn...But I'm stuck on installing peer dependencies...
This is what I tried...
Any help appreciated, thanks!
ERROR 1
ERROR 2
Beta Was this translation helpful? Give feedback.
All reactions