title: use axios in getStaticProps in next js
body: <p>i have a next project.in this project i used axios for send and recieved request data.
  but i have a problem when i use axios in getStaticProps function i get an error in my index.js page</p>
  <p>this is my index.js
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> import axios from "axios";
  
  const Home = (props) =&gt; {
      console.log(props);
      return &lt;div&gt;d&lt;/div&gt;;
  };
  
  export async function getStaticProps() {
      const res = await axios.get('https://jsonplaceholder.typicode.com/todos/1');
  
      return {
          props: {
              data: res
          }
      };
  }
  
  
  export default Home;</code></pre>
  </div>
  </div>
  </p>
  <p>and this is my index.js page in my browser
  <a href="https://i.stack.imgur.com/sV7qy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sV7qy.png" alt="enter image description here" /></a></p>
  <p>I would be very grateful if anyone could help me</p>