skip to Main Content

Reactjs – next.js 14.x middleware.ts not triggering

i have a app/middleware.ts but it didn't trigger, import { NextResponse, NextRequest } from 'next/server' // This function can be marked `async` if using `await` inside export function middleware(request: NextRequest) { return NextResponse.redirect(new URL('/home', request.url)) } export const config =…

VIEW QUESTION

Reactjs – Newly created Next.js app giving error URL.canParse is not a function

I have created Next.js app by the command npx create-next-app@latest after running it npm run dev, I am getting below error. Uncaught TypeError: URL.canParse is not a function at getSocketUrl (webpack-internal:///(:3001/app-pages-browser)/./node_modules/next/dist/client/components/react-dev-overlay/internal/helpers/get-socket-url.js:23:13) The app is created with Next.js version 14.2.11 I…

VIEW QUESTION
Back To Top
Search