Привет, помогите устранить ошибку!
Вот логи при сборке из Dockerfile:
Unhandled Runtime Error
Error: Unexpected token < in JSON at position 0
Source
src/queries/server.ts (76:21) @ async getSiteSettings
74 |
75 | export async function getSiteSettings() {
> 76 | const response = await fetch(`${BASE_URL}/api/setting/`, {
|^
77 | next: { revalidate: 10 },
78 | }).then((res) => {
79 | if (res.status === 404) {
Вот фрагмент кода из src/queries/server.ts:
import { notFound } from "next/navigation";
import { BASE_URL } from "@/lib/axios";
import {
authorSchema,
bankSchema,
careerSchema,
companyHistorySchema,
employeeSchema,
jumbotronSchema,
newsListSchema,
newsRetrieveSchema,
pageResultSchema,
partnerSchema,
projectSchema,
siteSettingsSchema,
viewSeoSchema,
yearSchema,
} from "@/types/schemas";export async function getSiteSettings() {
.
.
.
.
export async function getSiteSettings() {
const response = await fetch(`${BASE_URL}/api/setting/`, {
next: { revalidate: 10 },
}).then((res) => {
if (res.status === 404) {
notFound();
}
return res.json();
});
{ return siteSettingsSchema.array().optional().parse(response);
}