I've setup the backend and running, specify the .env files accordingly and trying to start the storefront and came across with this error. Any idea on how to fix that?
Error [SyntaxError]: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
at JSON.parse (<anonymous>)
at parseJSONFromBytes (file:///Users/volfcan/ZedProjects/nextjs-starter-medusa/node_modules/next/dist/compiled/edge-runtime/index.js:1:657096)
at successSteps (file:///Users/volfcan/ZedProjects/nextjs-starter-medusa/node_modules/next/dist/compiled/edge-runtime/index.js:1:657096)
at eval (file:///Users/volfcan/ZedProjects/nextjs-starter-medusa/node_modules/next/dist/compiled/edge-runtime/index.js:1:657096)
at <unknown> (node:internal/process/task_queues:140:7)
at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
middleware: true
}
I think this is originated from this line
const { regions } = await fetch(${BACKEND_URL}/store/regions, {
I've setup the backend and running, specify the .env files accordingly and trying to start the storefront and came across with this error. Any idea on how to fix that?
I think this is originated from this line
const { regions } = await fetch(
${BACKEND_URL}/store/regions, {
in the middleware.ts file