getStaticPath can only be called from page
i.e index.js so you need to move the
export getStaticProps to index.js and pass products as a prop to your
Or if you want to fetch data on client you can use useEffect hook in your product component
CLICK HERE to find out more related problems solutions.