I am new to React and had everything working before I decided to organize my code in folders and subfolders. Right now I'm getting this Module not found, but it isn't the "Can't resolve 'react' which there were some answers for. Maybe some of you might know this silly thing. Thanks in advance! I really appreciate it!
Here is the Compile error Image
Here is an image of my folder structure
Here is my Header.js
import React from 'react';
import './Header/CSS/Header.css';
// Class will consist of Header design and structure
const Header = (props) => {
return (
<header className="App-header">
<div className="container">
<button className="btn">
<span>About</span>
</button>
<button className="btn">
<span>Experience</span>
</button>
<button className="btn">
<span>Education</span>
</button>
<button className="btn">
<span>Projects</span>
</button>
<button className="btn">
<span>Contact</span>
</button>
</div>
</header>
)
};
export default Header;
Here is my Header.css
/*
========================
HEADER Component
CSS for the header
========================
*/
.App-header {
background-color: black;
min-height: 05vh;
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
padding: 5vw;
}
/*
========================
HEADER BUTTONS
========================
*/
.container {
display: inline-flex;
align-items: center;
justify-content: center;
}
.btn {
margin: 5%;
display: inline-flex;
}
Here is my App.js
import React, { Component } from 'react';
import './App.css';
import Header from './Header/js/Header.js';
/*
========================================
App class
Where everything is put together
eg. Skeleton of my website
========================================
*/
class App extends Component {
render() {
return (
<div className="App">
<Header />
</div>
);
}
}
export default App;