Error logs can be super cryptic, like "Error: The script will never generate a response."This would be a bug that generally you should open an issue on our repo for. Another user raised an issue a couple days ago about this that we have fixed related to the fetch patch which may also solve the problem for you - I'll shoot dario a message about making a release.
Github issues can stay unanswered for 2 weeksPlease feel free to bump an issue or add additional context if it's also affecting you.
wrangler pages dev locally in hope that it might give us some more information but it simply won't work on our Windows machines.https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/8953244999/npm-package-next-on-pages-771.interface CloudflareEnv {
DB: D1Database;
}import { D1Database } from "@cloudflare/workers-types";
import { drizzle } from "drizzle-orm/d1";
import { getRequestContext } from "@cloudflare/next-on-pages";
export const db = drizzle(
process.env.NODE_ENV === "development"
? getRequestContext().env.DB
: (process.env as unknown as CloudflareEnv).DB,
);import NextAuth, { type DefaultSession } from "next-auth";
import AzureAD from "next-auth/providers/azure-ad";
import { NextResponse } from "next/server";
import { DrizzleAdapter } from "@auth/drizzle-adapter";
import { db } from "@/db/db-connection";
export const {
handlers: { GET, POST },
auth,
signIn,
} = NextAuth({
secret: process.env.NEXTAUTH_SECRET as string,
trustHost: true,
session: {
strategy: "database",
},
adapter: DrizzleAdapter(db),
providers: [
//...provider stuff
],
callbacks: {
//...callback stuff
},
});09:47:38.194 ⚡️ Build log saved to '.vercel/output/static/_worker.js/nop-build-log.json'
09:47:38.194 ⚡️ Generated '.vercel/output/static/_worker.js/index.js'.
09:47:38.194 ⚡️ Build completed in 2.80s
09:47:38.257 Finished
09:47:38.257 Note: No functions dir at /functions found. Skipping.
09:47:38.257 Validating asset output directory
09:47:38.258 Error: Output directory " .vercel/output/static" not found.
09:47:39.593 Failed: build output directory not foundwrangler pages devhttps://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/8953244999/npm-package-next-on-pages-771