I'm currently experiencing this error and I'm not really sure how to fix it. I've been trying to merge a project with components stored in bit.dev.
import React from 'react';
import { createRoot } from 'react-dom/client'; // Cannot find module 'react-dom/client' or its corresponding type declarations.
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { BrowserRouter } from 'react-router-dom';
import 'bootstrap/dist/css/bootstrap.min.css';
const rootElement = document.getElementById('root');
if (!rootElement) throw new Error('Failed to find the root element');
const root = createRoot(rootElement);
root.render(
<React.StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>
);
Here is the code. Thanks for your help!