Add { styledComponents: true } to your next.config.js file
const nextConfig = {
reactStrictMode: true,
compiler: { styledComponents: true },
};
module.exports = nextConfig;
{
"presets": ["next/babel"],
"plugins": [["styled-components", { "ssr": true }]]
}