i have the same problem with localhost
const baseUrl = "http://api.aladhan.com/v1/calendar";
const year = new Date().getFullYear().toString();
const method = "4";
const url =
${baseUrl}/${year}?latitude=${lat}&longitude=${lon}&method=${method};
const res = await fetch(url, { mode: "no-cors" });
console.log(res);
if (res.ok) {
const json = await res.json();
console.log(json.data[0]);
}