the error is ReferenceError: hasProp is not defined.
at the end showing it cannot collect page data /api/crawl. my route.js is like this:
import { NextResponse } from "next/server";
export async function POST(request) {
const { target } = await request.json();
.... // all my logic
return NextResponse.json(data, { status: 201 });
}
it works just fine in dev, but this error only comes in build.