Accepted answer

Good times when this was my biggest problem lol

For whoever really needs an answer to this:

You can't currently use getStaticProps and getServerSideProps in the _app component, so if I'm not wrong I was trying to fetch initial data (probably categories list) and pass it to a component. To fetch initial data at _app level, you should use getInitialProps (NextJs developers suggest to avoid using this), but be aware that using it, will stop NextJs from automatically statically optimize the pages that do not rely on any kind of fetching method (they will be server-side rendered - even a simple "about us" page that could be served as static html otherwise)

You can read more about it here:

Related Query

More Query from same tag