Skyleen77 / next-nprogress-bar

NProgress integration on Next.js compatible with /app and /pages folders
https://next-nprogress-bar.vercel.app
315 stars 24 forks source link

location is not defined #70

Open ryanleecode opened 2 months ago

ryanleecode commented 2 months ago
Warning: Cannot update a component (`Router`) while rendering a different component (`AsdfMain`). To locate the bad setState() call inside `AsdfMain`, follow the stack trace as described in https://react.dev/link/setstate-in-render
    at AsdfMain (http://localhost:3000/_next/static/chunks/src_ea6acf._.js:343:26)
    at Suspense
    at div
    at div
    at main
    at HydrationBoundary (http://localhost:3000/_next/static/chunks/08b5e__pnpm_904842._.js:3718:28)
    at HydrateClient (Server)
    at AsdfPage (Server)
    at InnerLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:275:11)
    at RedirectErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4993:9)
    at RedirectBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5001:11)
    at NotFoundBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5246:11)
    at LoadingBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:381:11)
    at ErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4705:11)
    at InnerScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:186:9)
    at ScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:261:11)
    at RenderFromTemplateContext (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:507:44)
    at OuterLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:401:11)
    at InnerLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:275:11)
    at RedirectErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4993:9)
    at RedirectBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5001:11)
    at NotFoundBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5246:11)
    at LoadingBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:381:11)
    at ErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4705:11)
    at InnerScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:186:9)
    at ScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:261:11)
    at RenderFromTemplateContext (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:507:44)
    at OuterLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:401:11)
    at InnerLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:275:11)
    at RedirectErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4993:9)
    at RedirectBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5001:11)
    at NotFoundBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5246:11)
    at LoadingBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:381:11)
    at ErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4705:11)
    at InnerScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:186:9)
    at ScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:261:11)
    at RenderFromTemplateContext (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:507:44)
    at OuterLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:401:11)
    at div
    at main
    at div
    at div
    at DashboardLayout (Server)
    at InnerLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:275:11)
    at RedirectErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4993:9)
    at RedirectBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5001:11)
    at NotFoundErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5238:9)
    at NotFoundBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5246:11)
    at LoadingBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:381:11)
    at ErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4705:11)
    at InnerScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:186:9)
    at ScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:261:11)
    at RenderFromTemplateContext (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:507:44)
    at OuterLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:401:11)
    at MainLayout (Server)
    at InnerLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:275:11)
    at RedirectErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4993:9)
    at RedirectBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5001:11)
    at NotFoundErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5238:9)
    at NotFoundBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5246:11)
    at LoadingBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:381:11)
    at ErrorBoundaryHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4659:9)
    at ErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4705:11)
    at InnerScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:186:9)
    at ScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:261:11)
    at RenderFromTemplateContext (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:507:44)
    at OuterLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:401:11)
    at PostHogProvider (http://localhost:3000/_next/static/chunks/b8e15_posthog-js_de3f07._.js:6086:23)
    at Providers (http://localhost:3000/_next/static/chunks/src_695f78._.js:501:22)
    at TRPCProvider (http://localhost:3000/_next/static/chunks/08b5e__pnpm_da0050._.js:19776:17)
    at QueryClientProvider (http://localhost:3000/_next/static/chunks/08b5e__pnpm_da0050._.js:18491:30)
    at TRPCReactProvider (http://localhost:3000/_next/static/chunks/src_695f78._.js:433:404)
    at f (http://localhost:3000/_next/static/chunks/08b5e__pnpm_da0050._.js:15437:24)
    at $ (http://localhost:3000/_next/static/chunks/08b5e__pnpm_da0050._.js:15434:393)
    at ThemeProvider (http://localhost:3000/_next/static/chunks/src_695f78._.js:15:26)
    at TriggerProvider (http://localhost:3000/_next/static/chunks/08b5e__pnpm_da0050._.js:21393:28)
    at Provider (http://localhost:3000/_next/static/chunks/08b5e__pnpm_da0050._.js:15636:21)
    at TooltipProvider (http://localhost:3000/_next/static/chunks/08b5e__pnpm_da0050._.js:17005:13)
    at body
    at html
    at InnerLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:275:11)
    at RedirectErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4993:9)
    at RedirectBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5001:11)
    at NotFoundErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5238:9)
    at NotFoundBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5246:11)
    at LoadingBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:381:11)
    at ErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4705:11)
    at InnerScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:186:9)
    at ScrollAndFocusHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:261:11)
    at RenderFromTemplateContext (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:507:44)
    at OuterLayoutRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_0e04ae._.js:401:11)
    at RedirectErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4993:9)
    at RedirectBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5001:11)
    at NotFoundErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5238:9)
    at NotFoundBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5246:11)
    at DevRootNotFoundBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:5306:11)
    at ReactDevOverlay (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:12135:9)
    at HotReload (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:12914:11)
    at Router (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:13211:11)
    at ErrorBoundaryHandler (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4659:9)
    at ErrorBoundary (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:4705:11)
    at AppRouter (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:13612:13)
    at ServerRoot (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:13922:27)
    at Root (http://localhost:3000/_next/static/chunks/ea74f_next_dist_client_f1608f._.js:13926:11)

on-recoverable-error.ts:26 Uncaught Switched to client rendering because the server rendering errored:

ReferenceError: location is not defined


`