Lately, I completed a next.js project and integrated Google Analytics using @next/third-parties/google. During development, everything worked perfectly, but upon deploying it to vercel.com, an error popped up.
` ./app/layout.tsx:34:24
Type error: The type 'string | undefined' cannot be assigned to
type 'string'.
'undefined' is not compatible with 'string'.
</NextAuthProvider>
</body>
<GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS} />
^
</html>
);
}
Error: Command "npx prisma generate && next build" exited with
1``your text