title: Next.js - GetStaticPaths TypeError
body: <p>i have the following issue with getStaticPaths of Next.JS:</p>
  <p><strong>TypeError: cias.map is not a function</strong>
  <a href="https://i.stack.imgur.com/IVZDp.png" rel="nofollow noreferrer">https://i.stack.imgur.com/IVZDp.png</a></p>
  <p>Can someone help me with this, please?</p>
  <p>Code:</p>
  <pre><code>import React from 'react'
  import { Container } from '../../../styles/pages/container'
  import { GetStaticProps, GetStaticPaths } from 'next'
  import fetch from 'isomorphic-unfetch'
  
      export const getStaticPaths: GetStaticPaths = async () =&gt; {
        const res = await fetch('http://localhost:3000/api/infocadcias')
        const cias = await res.json()
      
        const paths = cias.map(cia =&gt; ({
          params: { id: cia.ID.toString() }
        }))
      
        return { paths, fallback: false }
      }
      
      export const getStaticProps: GetStaticProps = async ({ params }) =&gt; {
        const res = await fetch(`http://localhost:3000/infocadcias/${params.id}`)
        const cia = await res.json()
      
        return cia
      }
      
      // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
      export default function InfoCia({ cia }) {
        return (
          &lt;Container&gt;
            &lt;ul&gt;
              {cia.map(p =&gt; (
                &lt;li className=&quot;cia&quot; key={p.ID}&gt;
                  &lt;span&gt;Name: {p.Name}&lt;/span&gt;
                &lt;/li&gt;
              ))}
            &lt;/ul&gt;
          &lt;/Container&gt;
        )
      }
  </code></pre>