I have this NextJS project that im trying to deploy. But when it builds, it fails an gives me this error:
Build optimization failed: found pages without a React Component as default export in pages/portfolio/styles pages/styles
Those files are these:
import tw from "tailwind-styled-components";
export const Wrapper = tw.div`
h-screen
flex
flex-col
`;
export const Main = tw.main`
`;
export const Container = tw.div`
flex
items-center
justify-center
flex-col
`;
export const Footer = tw.div`
w-full
flex
items-center
justify-center
min-h-[50px]
bg-black
mt-5
`;
export const HeroSection = tw.div`
relative
w-full
h-[70vh]
lg:h-[100vh]
bg-black
`;
export const HomeGallery = tw.div`
grid
grid-cols-1
w-full
`;
export const About = tw.div`
text-justify
text-lg
px-5
py-9
`;
And
import tw from "tailwind-styled-components";
export const Container = tw.div`
`;
export const ImagesContainer = tw.div`
grid
grid-cols-1
`;
I tried using styled components instead of taiwilnd styled components and got the same problem. I remember using styles.js files with styled components on another project so I don't understand where's the problem