I have ran into this for trying to build the responsive design with SSR feature in NextJS.
Here I captured the steps when I worked through to the end solution.