This is my function to get a path will be run in local dev mode
export async function getStaticPaths(){
const datas = await fetch(`https://mydomain.vercel.app/api/annonces/annonces`)
const annonces = await datas.json()
const paths = annonces.map(item =>({
params: {annonce: item._id}
}))
return {
paths,
fallback: false
}
}
This is my error when I deploy my app
> Build error occurred
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)