title: next js react app fetch not defined error
body: <p>I am trying to clone the following next.js react app and run it on localhost:3000</p>
  
  <p><a href="https://github.com/elee-ittdublin/lab6-nextjs" rel="nofollow noreferrer">https://github.com/elee-ittdublin/lab6-nextjs</a></p>
  
  <p>when I open localhost:3000 I get the following error</p>
  
  <p>Unhandled Rejection (ReferenceError): fetch is not defined
  Function._callee$
  ./pages/index.js:22</p>
  
  <pre><code>20 | // see https://nextjs.org/learn/basics/fetching-data-for-pages
  &gt;22 | Index.getInitialProps = async function() {
  24 |   const url = 'https://api.tvmaze.com/search/shows?q=batman';
  </code></pre>
  
  <p>I have tried to research what I am doing wrong but I still can not fix my problem. Can anyone see where I am going wrong?</p>
  
  <p>Cheers</p>