Can't run React 18 on React Vite starter

So I was able to upgrade to React 18 on a Vite starter project locally, but within Glitch I get either a blank screen or an error saying it doesn’t like the line where ReactDOM is imported from react-dom/client. Is there a known way around this?

EDIT: I tried recreating the issue with a blank starter and React 18 works, so it looks like there’s some other conflict within my particular project. I am running Node 16 and upgraded the dev dependencies so that might have something to do with it.

1 Like

Hey!

Were you able to solve this issue? I’m facing the same issue in an app where I upgraded my dependencies and also migrated from CRA to Vite

Hey, so I realized that the react-dayjs package doesn’t play well with React 18. That was the problem for the project I was referring to above. So I ended up just sticking with React 17. Otherwise, I’m able to run 18 just fine.

What’s the link to your project? Happy to take a look at it!