I am coding along to a React tutorial for a LinkedIn clone but none of my code in my js files are showing up in my react redux server. And when I try to run the code in VSCODE I get this error:
<div className='header'>
^
SyntaxError: Unexpected token '<'
at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:117:18)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:337:14)
at async link (node:internal/modules/esm/module_job:70:21)
This is the code in my js file:
import React from "react";
import "./App.css";
import Header from "./Header";
function App() {
return (
<div className="app">
<h1>Linkedin Clone</h1>
{/*Header*/}
<Header />
{/*App Body*/}
{/*Sidebar*/}
{/*Feed*/}
{/*Widgets*/}
</div>
);
}
export default App;
My h1 element doesn't show up, can anyone point me in the right direction? Thank you.
I tried adding "type": "module" in my package json files which got rid of the error messages I was getting before but now I just have a blank live server screen.