I am attempting to take my git repo with a practice React app and put it into codesandbox.io so that I can show it to others I am working with more easily. I followed the instructions at got my sandbox up here: https://codesandbox.io/s/github/cdpautsch/react-learning-area/tree/master/test-app2
However, I get the error: Target container is not a DOM element
evaluate
/src/index.js:52:9
49 | }
50 | }
51 |
> 52 | ReactDOM.render((
| ^
53 | <Provider store={store}>
54 | <BrowserRouter>
55 | <div>
This error does NOT come up on my machine when I am running with webpack-dev-server.
My code from index.js:
ReactDOM.render((
<Provider store={store}>
<BrowserRouter>
<div>
<Navbar />
<Route exact path = "/" component = {Home} />
<Route path = "/cards" component = {CardsGame} />
</div>
</BrowserRouter>
</Provider>
), document.getElementById('app'));
My code from index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>TestApp2</title>
</head>
<body>
<div id="app"></div>
</body>
</html>
It says it's not a valid element, but it's definitely there and definitely has the right name. What am I missing?
Updating with additional information:
* The app was not created with create-react-app, but initialized and loaded with packages manually
* Sandbox seems to default to CRA, and this may affect how it runs?
<script src="index.js" type="text/javascript"/>package.jsononly has the stuff that I put in. There shouldn't be anything left behind.