Are you using v5 of next-auth, which is currently under next-auth@beta?
Are you using v5 of next-auth, which is currently under next-auth@beta?
npx wrangler pages deployment tailnpm run dev but when I try to start it with "preview": "npm run pages:build && wrangler pages dev .vercel/output/static", req.auth starts be always null and I don't know why because I don't getting any error.auth((req) => { is wrapper for middleware from next-auth v5 that looks something like this under the hoodreq: NextResponse supposed to be like that? (maybe you meant (req) : NextResponse)Error: The 'cache' field on 'RequestInitializerDict' is not implemented., when googling this, I found some supabase stuff, which I don't use.cache part, if I remove it, it works fine. What's wrong with the no-cache? Is there a reason why it suddenly does not work anymore?appwrite sdk, I am also getting: Error: The 'credentials' field on 'RequestInitializerDict' is not implemented. useSecureCookies: process.env.NODE_ENV === "development" ? false : true, to next-auth config and now everyting works
Error: The 'credentials' field on 'RequestInitializerDict' is not implemented.wrangler dev ./thedo.ts i can hit the DO directly in the browser without any issues
cache: 'no-cache' part)@cloudflare/pages-plugin-vercel-og/api and im getting a load of errors like so. Failed to set fetch cache https://foobar.com/data Error: fetch for over 2MB of data can not be cached
▲ Error: Importing "@vercel/next": require() of ES Module /home/runner/work/repo/repo/node_modules/string-width/index.js from /home/runner/work/repo/repo/node_modules/wide-align/align.js not supported.CF_PAGES_URL is available in dev? If yes then any idea on how can I access it?npx wrangler pages deployment tail"preview": "npm run pages:build && wrangler pages dev .vercel/output/static",auth((req) => {req: NextResponse(req) : NextResponseimport { NextResponse } from 'next/server'
import { auth } from './auth'
export default auth((req) => {
const isAuthenticated = !!req.auth
if (isAuthenticated && req.nextUrl.pathname.startsWith(/* */)) {
return NextResponse.redirect(/* */)
}
})Error: The 'cache' field on 'RequestInitializerDict' is not implemented.appwriteError: The 'credentials' field on 'RequestInitializerDict' is not implemented.Error: The 'credentials' field on 'RequestInitializerDict' is not implemented. useSecureCookies: process.env.NODE_ENV === "development" ? false : true,export async function GET(request: NextRequest) {
const context = getRequestContext();
let id = context.env.RATE_LIMITER.idFromName(new URL(request.url).pathname);
const stub = context.env.RATE_LIMITER.get(id);
console.log({ id, stub });
return stub.fetch(request);
}{
id: constructor { name: undefined },
stub: constructor { name: undefined, id: undefined }
}
⨯ Error [TypeError]: Failed to parse URL from [object Request]wrangler dev ./thedo.tscache: 'no-cache'@cloudflare/pages-plugin-vercel-og/api ⨯ ./node_modules/@cloudflare/pages-plugin-vercel-og/dist/src/api/noto-sans-v27-latin-regular.ttf.bin
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)▲ Error: Importing "@vercel/next": require() of ES Module /home/runner/work/repo/repo/node_modules/string-width/index.js from /home/runner/work/repo/repo/node_modules/wide-align/align.js not supported.CF_PAGES_URLimport { NextResponse } from "next/server"
import { auth } from "./auth"
export default auth((req) => {
const isAuth = req.auth // always returning null when it is run on wrangler pages devimport { NextResponse } from "next/server"
import { auth } from "./auth"
export async function middleware(req: NextResponse) {
const session = await auth() const response = await fetch(
`${process.env.NEXT_PUBLIC_API_URL}/v1/databases/hp_db/collections/userdata/documents`,
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
'X-Appwrite-Project': `${process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID}`,
'X-Appwrite-Response-Format': '1.4.0',
},
cache: 'no-cache',
}
)