DEV Community

Gilbert Ngeno
Gilbert Ngeno

Posted on

Can't build React/Next project - found page without a React Component as default export (context api file)

I'm trying to build my Next.js project but it keeps giving me this error in the terminal:

Error: Build optimization failed: found page without a React Component as default export in
pages/components/context/Context

That's the React context API file, there isn't supposed to be any default export there. Is this a…

Top comments (0)