Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
b2c751f4
Unverified
Commit
b2c751f4
authored
Aug 12, 2025
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Aug 12, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[devtools] Remove unused `componentStackFrames` field (#82395)
parent
333489d8
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
12 additions
and
206 deletions
+12
-206
app-next-dev.ts
packages/next/src/client/app-next-dev.ts
+2
-5
app-next-turbopack.ts
packages/next/src/client/app-next-turbopack.ts
+2
-2
error-boundary-callbacks.ts
...client/react-client-callbacks/error-boundary-callbacks.ts
+4
-7
on-recoverable-error.ts
...src/client/react-client-callbacks/on-recoverable-error.ts
+2
-3
dev-overlay.browser.tsx
packages/next/src/next-devtools/dev-overlay.browser.tsx
+0
-7
error-overlay-nav.stories.tsx
...ts/errors/error-overlay-nav/error-overlay-nav.stories.tsx
+0
-3
error-overlay-pagination.stories.tsx
...r-overlay-pagination/error-overlay-pagination.stories.tsx
+0
-3
errors.stories.tsx
...rc/next-devtools/dev-overlay/container/errors.stories.tsx
+0
-16
render-error.tsx
...ools/dev-overlay/container/runtime-error/render-error.tsx
+0
-2
shared.ts
packages/next/src/next-devtools/dev-overlay/shared.ts
+0
-8
errors.ts
...es/next/src/next-devtools/dev-overlay/storybook/errors.ts
+0
-19
get-error-by-type.ts
.../src/next-devtools/dev-overlay/utils/get-error-by-type.ts
+0
-3
parse-component-stack.ts
.../next-devtools/dev-overlay/utils/parse-component-stack.ts
+0
-109
stitched-error.ts
.../src/next-devtools/userspace/app/errors/stitched-error.ts
+1
-17
pages-dev-overlay-setup.tsx
...next-devtools/userspace/pages/pages-dev-overlay-setup.tsx
+1
-2
No files found.
packages/next/src/client/app-next-dev.ts
View file @
b2c751f4
...
...
@@ -4,10 +4,7 @@ import './app-webpack'
import
{
renderAppDevOverlay
}
from
'next/dist/compiled/next-devtools'
import
{
appBootstrap
}
from
'./app-bootstrap'
import
{
getComponentStack
,
getOwnerStack
,
}
from
'../next-devtools/userspace/app/errors/stitched-error'
import
{
getOwnerStack
}
from
'../next-devtools/userspace/app/errors/stitched-error'
import
{
isRecoverableError
}
from
'./react-client-callbacks/on-recoverable-error'
// eslint-disable-next-line @next/internal/typechecked-require
...
...
@@ -18,6 +15,6 @@ appBootstrap(() => {
try
{
hydrate
(
instrumentationHooks
)
}
finally
{
renderAppDevOverlay
(
get
ComponentStack
,
get
OwnerStack
,
isRecoverableError
)
renderAppDevOverlay
(
getOwnerStack
,
isRecoverableError
)
}
})
packages/next/src/client/app-next-turbopack.ts
View file @
b2c751f4
...
...
@@ -13,11 +13,11 @@ appBootstrap(() => {
hydrate
(
instrumentationHooks
)
}
finally
{
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
const
{
get
ComponentStack
,
get
OwnerStack
}
=
const
{
getOwnerStack
}
=
require
(
'../next-devtools/userspace/app/errors/stitched-error'
)
as
typeof
import
(
'../next-devtools/userspace/app/errors/stitched-error'
)
const
{
renderAppDevOverlay
}
=
require
(
'next/dist/compiled/next-devtools'
)
as
typeof
import
(
'next/dist/compiled/next-devtools'
)
renderAppDevOverlay
(
get
ComponentStack
,
get
OwnerStack
,
isRecoverableError
)
renderAppDevOverlay
(
getOwnerStack
,
isRecoverableError
)
}
}
})
packages/next/src/client/react-client-callbacks/error-boundary-callbacks.ts
View file @
b2c751f4
...
...
@@ -54,7 +54,7 @@ export function onCaughtError(
// We don't consider errors caught unless they're caught by an explicit error
// boundary. The built-in ones are considered implicit.
// This mimics how the same app would behave without Next.js.
return
onUncaughtError
(
thrownValue
,
errorInfo
)
return
onUncaughtError
(
thrownValue
)
}
// Skip certain custom errors which are not expected to be reported on client
...
...
@@ -84,7 +84,7 @@ export function onCaughtError(
:
`The above error occurred in one of your components.`
const
errorLocation
=
`
${
componentErrorMessage
}
${
errorBoundaryMessage
}
`
const
error
=
devToolErrorMod
.
decorateDevError
(
thrownValue
,
errorInfo
)
const
error
=
devToolErrorMod
.
decorateDevError
(
thrownValue
)
// Log and report the error with location but without modifying the error stack
devToolErrorMod
.
originConsoleError
(
'%o
\
n
\
n%s'
,
thrownValue
,
errorLocation
)
...
...
@@ -95,15 +95,12 @@ export function onCaughtError(
}
}
export
function
onUncaughtError
(
thrownValue
:
unknown
,
errorInfo
:
React
.
ErrorInfo
)
{
export
function
onUncaughtError
(
thrownValue
:
unknown
)
{
// Skip certain custom errors which are not expected to be reported on client
if
(
isBailoutToCSRError
(
thrownValue
)
||
isNextRouterError
(
thrownValue
))
return
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
const
error
=
devToolErrorMod
.
decorateDevError
(
thrownValue
,
errorInfo
)
const
error
=
devToolErrorMod
.
decorateDevError
(
thrownValue
)
// TODO: Add an adendum to the overlay telling people about custom error boundaries.
reportGlobalError
(
error
)
...
...
packages/next/src/client/react-client-callbacks/on-recoverable-error.ts
View file @
b2c751f4
...
...
@@ -12,8 +12,7 @@ export function isRecoverableError(error: Error): boolean {
}
export
const
onRecoverableError
:
HydrationOptions
[
'onRecoverableError'
]
=
(
error
,
errorInfo
error
)
=>
{
// x-ref: https://github.com/facebook/react/pull/28736
let
cause
=
isError
(
error
)
&&
'cause'
in
error
?
error
.
cause
:
error
...
...
@@ -23,7 +22,7 @@ export const onRecoverableError: HydrationOptions['onRecoverableError'] = (
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
const
{
decorateDevError
}
=
require
(
'../../next-devtools/userspace/app/errors/stitched-error'
)
as
typeof
import
(
'../../next-devtools/userspace/app/errors/stitched-error'
)
const
causeError
=
decorateDevError
(
cause
,
errorInfo
)
const
causeError
=
decorateDevError
(
cause
)
recoverableErrors
.
add
(
causeError
)
cause
=
causeError
}
...
...
packages/next/src/next-devtools/dev-overlay.browser.tsx
View file @
b2c751f4
...
...
@@ -185,13 +185,11 @@ function replayQueuedEvents(dispatch: NonNullable<typeof maybeDispatch>) {
}
function
DevOverlayRoot
({
getComponentStack
,
getOwnerStack
,
getSquashedHydrationErrorDetails
,
isRecoverableError
,
routerType
,
}:
{
getComponentStack
:
(
error
:
Error
)
=>
string
|
undefined
getOwnerStack
:
(
error
:
Error
)
=>
string
|
null
|
undefined
getSquashedHydrationErrorDetails
:
(
error
:
Error
)
=>
HydrationErrorState
|
null
isRecoverableError
:
(
error
:
Error
)
=>
boolean
...
...
@@ -199,7 +197,6 @@ function DevOverlayRoot({
})
{
const
[
state
,
dispatch
]
=
useErrorOverlayReducer
(
routerType
,
getComponentStack
,
getOwnerStack
,
isRecoverableError
)
...
...
@@ -254,7 +251,6 @@ function getSquashedHydrationErrorDetailsApp() {
}
export
function
renderAppDevOverlay
(
getComponentStack
:
(
error
:
Error
)
=>
string
|
undefined
,
getOwnerStack
:
(
error
:
Error
)
=>
string
|
null
|
undefined
,
isRecoverableError
:
(
error
:
Error
)
=>
boolean
):
void
{
...
...
@@ -293,7 +289,6 @@ export function renderAppDevOverlay(
// At least it won't unmount any user code if it errors.
root
.
render
(
<
DevOverlayRoot
getComponentStack=
{
getComponentStack
}
getOwnerStack=
{
getOwnerStack
}
getSquashedHydrationErrorDetails=
{
getSquashedHydrationErrorDetailsApp
}
isRecoverableError=
{
isRecoverableError
}
...
...
@@ -307,7 +302,6 @@ export function renderAppDevOverlay(
}
export
function
renderPagesDevOverlay
(
getComponentStack
:
(
error
:
Error
)
=>
string
|
undefined
,
getOwnerStack
:
(
error
:
Error
)
=>
string
|
null
|
undefined
,
getSquashedHydrationErrorDetails
:
(
error
:
Error
...
...
@@ -357,7 +351,6 @@ export function renderPagesDevOverlay(
// At least it won't unmount any user code if it errors.
root
.
render
(
<
DevOverlayRoot
getComponentStack=
{
getComponentStack
}
getOwnerStack=
{
getOwnerStack
}
getSquashedHydrationErrorDetails=
{
getSquashedHydrationErrorDetails
}
isRecoverableError=
{
isRecoverableError
}
...
...
packages/next/src/next-devtools/dev-overlay/components/errors/error-overlay-nav/error-overlay-nav.stories.tsx
View file @
b2c751f4
...
...
@@ -21,7 +21,6 @@ export const Default: Story = {
runtime
:
true
,
error
:
new
Error
(
'First error message'
),
frames
:
()
=>
Promise
.
resolve
([]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
{
...
...
@@ -29,7 +28,6 @@ export const Default: Story = {
runtime
:
true
,
error
:
new
Error
(
'Second error message'
),
frames
:
()
=>
Promise
.
resolve
([]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
{
...
...
@@ -37,7 +35,6 @@ export const Default: Story = {
runtime
:
true
,
error
:
new
Error
(
'Third error message'
),
frames
:
()
=>
Promise
.
resolve
([]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
],
...
...
packages/next/src/next-devtools/dev-overlay/components/errors/error-overlay-pagination/error-overlay-pagination.stories.tsx
View file @
b2c751f4
...
...
@@ -22,7 +22,6 @@ const mockErrors: ReadyRuntimeError[] = [
runtime
:
true
as
const
,
error
:
new
Error
(
'First error'
),
frames
:
()
=>
Promise
.
resolve
([]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
{
...
...
@@ -30,7 +29,6 @@ const mockErrors: ReadyRuntimeError[] = [
runtime
:
true
as
const
,
error
:
new
Error
(
'Second error'
),
frames
:
()
=>
Promise
.
resolve
([]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
{
...
...
@@ -38,7 +36,6 @@ const mockErrors: ReadyRuntimeError[] = [
runtime
:
true
as
const
,
error
:
new
Error
(
'Third error'
),
frames
:
()
=>
Promise
.
resolve
([]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
]
...
...
packages/next/src/next-devtools/dev-overlay/container/errors.stories.tsx
View file @
b2c751f4
...
...
@@ -89,22 +89,6 @@ export const WithHydrationWarning: Story = {
},
},
]),
componentStackFrames
:
[
{
component
:
'MyComponent'
,
file
:
'app/page.tsx'
,
line1
:
10
,
column1
:
5
,
canOpenInEditor
:
true
,
},
{
component
:
'ParentComponent'
,
file
:
'app/layout.tsx'
,
line1
:
20
,
column1
:
3
,
canOpenInEditor
:
true
,
},
],
type
:
'runtime'
,
},
],
...
...
packages/next/src/next-devtools/dev-overlay/container/runtime-error/render-error.tsx
View file @
b2c751f4
...
...
@@ -6,14 +6,12 @@ import {
getErrorByType
,
type
ReadyRuntimeError
,
}
from
'../../utils/get-error-by-type'
import
type
{
ComponentStackFrame
}
from
'../../utils/parse-component-stack'
import
{
usePersistentCacheErrorDetection
}
from
'../../components/errors/error-overlay-toolbar/restart-server-button'
export
type
SupportedErrorEvent
=
{
id
:
number
error
:
Error
frames
:
readonly
StackFrame
[]
componentStackFrames
?:
readonly
ComponentStackFrame
[]
type
:
'runtime'
|
'recoverable'
|
'console'
}
...
...
packages/next/src/next-devtools/dev-overlay/shared.ts
View file @
b2c751f4
...
...
@@ -2,7 +2,6 @@ import { useReducer } from 'react'
import
type
{
VersionInfo
}
from
'../../server/dev/parse-version-info'
import
type
{
SupportedErrorEvent
}
from
'./container/runtime-error/render-error'
import
{
parseComponentStack
}
from
'./utils/parse-component-stack'
import
type
{
DebugInfo
}
from
'../shared/types'
import
type
{
DevIndicatorServerState
}
from
'../../server/dev/dev-indicator-server-state'
import
{
parseStack
}
from
'../../server/lib/parse-stack'
...
...
@@ -319,7 +318,6 @@ function getInitialState(
export
function
useErrorOverlayReducer
(
routerType
:
'pages'
|
'app'
,
getComponentStack
:
(
error
:
Error
)
=>
string
|
undefined
,
getOwnerStack
:
(
error
:
Error
)
=>
string
|
null
|
undefined
,
isRecoverableError
:
(
error
:
Error
)
=>
boolean
)
{
...
...
@@ -328,18 +326,12 @@ export function useErrorOverlayReducer(
id
:
number
,
error
:
Error
):
readonly
SupportedErrorEvent
[]
{
const
componentStack
=
getComponentStack
(
error
)
const
componentStackFrames
=
componentStack
===
undefined
?
undefined
:
parseComponentStack
(
componentStack
)
const
ownerStack
=
getOwnerStack
(
error
)
const
frames
=
parseStack
((
error
.
stack
||
''
)
+
(
ownerStack
||
''
))
const
pendingEvent
:
SupportedErrorEvent
=
{
id
,
error
,
frames
,
componentStackFrames
,
type
:
isRecoverableError
(
error
)
?
'recoverable'
:
isConsoleError
(
error
)
...
...
packages/next/src/next-devtools/dev-overlay/storybook/errors.ts
View file @
b2c751f4
...
...
@@ -62,15 +62,6 @@ export const errors: SupportedErrorEvent[] = [
error
:
Object
.
assign
(
new
Error
(
'First error message'
),
{
__NEXT_ERROR_CODE
:
'E001'
,
}),
componentStackFrames
:
[
{
file
:
'app/page.tsx'
,
component
:
'Home'
,
line1
:
10
,
column1
:
5
,
canOpenInEditor
:
true
,
},
],
frames
:
[
{
file
:
'app/page.tsx'
,
...
...
@@ -126,7 +117,6 @@ export const runtimeErrors: ReadyRuntimeError[] = [
},
...
Array
(
20
).
fill
(
ignoredFrame
),
]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
{
...
...
@@ -145,7 +135,6 @@ export const runtimeErrors: ReadyRuntimeError[] = [
originalCodeFrame
:
originalCodeFrame
(
'Second error message'
),
},
]),
componentStackFrames
:
undefined
,
type
:
'console'
,
},
{
...
...
@@ -164,7 +153,6 @@ export const runtimeErrors: ReadyRuntimeError[] = [
originalCodeFrame
:
originalCodeFrame
(
'Third error message'
),
},
]),
componentStackFrames
:
undefined
,
type
:
'recoverable'
,
},
{
...
...
@@ -183,7 +171,6 @@ export const runtimeErrors: ReadyRuntimeError[] = [
originalCodeFrame
:
originalCodeFrame
(
'typeof window !== undefined'
),
},
]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
{
...
...
@@ -208,7 +195,6 @@ export const runtimeErrors: ReadyRuntimeError[] = [
originalCodeFrame
:
originalCodeFrame
(
'Fifth error message'
),
},
]),
componentStackFrames
:
undefined
,
type
:
'console'
,
},
{
...
...
@@ -227,7 +213,6 @@ export const runtimeErrors: ReadyRuntimeError[] = [
originalCodeFrame
:
originalCodeFrame
(
'Sixth error message'
),
},
]),
componentStackFrames
:
undefined
,
type
:
'recoverable'
,
},
{
...
...
@@ -246,7 +231,6 @@ export const runtimeErrors: ReadyRuntimeError[] = [
originalCodeFrame
:
originalCodeFrame
(
'Sixth error message'
),
},
]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
{
...
...
@@ -265,7 +249,6 @@ export const runtimeErrors: ReadyRuntimeError[] = [
originalCodeFrame
:
originalCodeFrame
(
'Eighth error message'
),
},
]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
{
...
...
@@ -284,7 +267,6 @@ export const runtimeErrors: ReadyRuntimeError[] = [
originalCodeFrame
:
originalCodeFrame
(
'Ninth error message'
),
},
]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
{
...
...
@@ -303,7 +285,6 @@ export const runtimeErrors: ReadyRuntimeError[] = [
originalCodeFrame
:
originalCodeFrame
(
'Tenth error message'
),
},
]),
componentStackFrames
:
undefined
,
type
:
'runtime'
,
},
]
packages/next/src/next-devtools/dev-overlay/utils/get-error-by-type.ts
View file @
b2c751f4
import
type
{
SupportedErrorEvent
}
from
'../container/runtime-error/render-error'
import
{
getOriginalStackFrames
}
from
'../../shared/stack-frame'
import
type
{
OriginalStackFrame
}
from
'../../shared/stack-frame'
import
type
{
ComponentStackFrame
}
from
'./parse-component-stack'
import
{
getErrorSource
}
from
'../../../shared/lib/error-source'
import
React
from
'react'
...
...
@@ -12,7 +11,6 @@ export type ReadyRuntimeError = {
frames
:
|
readonly
OriginalStackFrame
[]
|
(()
=>
Promise
<
readonly
OriginalStackFrame
[]
>
)
componentStackFrames
:
readonly
ComponentStackFrame
[]
|
undefined
type
:
'runtime'
|
'console'
|
'recoverable'
}
...
...
@@ -51,7 +49,6 @@ export async function getErrorByType(
runtime
:
true
,
error
:
event
.
error
,
type
:
event
.
type
,
componentStackFrames
:
event
.
componentStackFrames
,
}
as
const
if
(
'use'
in
React
)
{
...
...
packages/next/src/next-devtools/dev-overlay/utils/parse-component-stack.ts
deleted
100644 → 0
View file @
333489d8
export
type
ComponentStackFrame
=
{
canOpenInEditor
:
boolean
component
:
string
file
:
string
|
null
line1
:
number
|
null
column1
:
number
|
null
}
enum
LocationType
{
FILE
=
'file'
,
WEBPACK_INTERNAL
=
'webpack-internal'
,
HTTP
=
'http'
,
PROTOCOL_RELATIVE
=
'protocol-relative'
,
UNKNOWN
=
'unknown'
,
}
/**
* Get the type of frame line based on the location
*/
function
getLocationType
(
location
:
string
):
LocationType
{
if
(
location
.
startsWith
(
'file://'
))
{
return
LocationType
.
FILE
}
if
(
location
.
includes
(
'webpack-internal://'
))
{
return
LocationType
.
WEBPACK_INTERNAL
}
if
(
location
.
startsWith
(
'http://'
)
||
location
.
startsWith
(
'https://'
))
{
return
LocationType
.
HTTP
}
if
(
location
.
startsWith
(
'//'
))
{
return
LocationType
.
PROTOCOL_RELATIVE
}
return
LocationType
.
UNKNOWN
}
function
parseStackFrameLocation
(
location
:
string
):
Omit
<
ComponentStackFrame
,
'component'
>
{
const
locationType
=
getLocationType
(
location
)
const
modulePath
=
location
?.
replace
(
/^
(
webpack-internal:
\/\/\/
|file:
\/\/)(\(
.*
\)\/)?
/
,
''
)
const
[,
file
,
line1
,
column1
]
=
modulePath
?.
match
(
/^
(
.+
)
:
(\d
+
)
:
(\d
+
)
/
)
??
[]
switch
(
locationType
)
{
case
LocationType
.
FILE
:
case
LocationType
.
WEBPACK_INTERNAL
:
return
{
canOpenInEditor
:
true
,
file
,
line1
:
line1
?
Number
(
line1
)
:
null
,
column1
:
column1
?
Number
(
column1
)
:
null
,
}
// When the location is a URL we only show the file
// TODO: Resolve http(s) URLs through sourcemaps
case
LocationType
.
HTTP
:
case
LocationType
.
PROTOCOL_RELATIVE
:
case
LocationType
.
UNKNOWN
:
default
:
{
return
{
canOpenInEditor
:
false
,
file
:
null
,
line1
:
null
,
column1
:
null
,
}
}
}
}
export
function
parseComponentStack
(
componentStack
:
string
):
ComponentStackFrame
[]
{
const
componentStackFrames
:
ComponentStackFrame
[]
=
[]
for
(
const
line
of
componentStack
.
trim
().
split
(
'
\
n'
))
{
// TODO: support safari stack trace
// Get component and file from the component stack line
const
match
=
/at
([^
]
+
)(
\((
.*
)\))?
/
.
exec
(
line
)
if
(
match
?.[
1
])
{
const
component
=
match
[
1
]
const
location
=
match
[
3
]
if
(
!
location
)
{
componentStackFrames
.
push
({
canOpenInEditor
:
false
,
component
,
file
:
null
,
line1
:
null
,
column1
:
null
,
})
continue
}
// Stop parsing the component stack if we reach a Next.js component
if
(
location
?.
includes
(
'next/dist'
))
{
break
}
const
frameLocation
=
parseStackFrameLocation
(
location
)
componentStackFrames
.
push
({
component
,
...
frameLocation
,
})
}
}
return
componentStackFrames
}
packages/next/src/next-devtools/userspace/app/errors/stitched-error.ts
View file @
b2c751f4
...
...
@@ -2,14 +2,6 @@ import React from 'react'
import
isError
from
'../../../../lib/is-error'
const
ownerStacks
=
new
WeakMap
<
Error
,
string
|
null
>
()
const
componentStacks
=
new
WeakMap
<
Error
,
string
>
()
export
function
getComponentStack
(
error
:
Error
):
string
|
undefined
{
return
componentStacks
.
get
(
error
)
}
export
function
setComponentStack
(
error
:
Error
,
stack
:
string
)
{
componentStacks
.
set
(
error
,
stack
)
}
export
function
getOwnerStack
(
error
:
Error
):
string
|
null
|
undefined
{
return
ownerStacks
.
get
(
error
)
...
...
@@ -29,16 +21,8 @@ export function setOwnerStackIfAvailable(error: Error): void {
}
}
export
function
decorateDevError
(
thrownValue
:
unknown
,
errorInfo
:
React
.
ErrorInfo
)
{
export
function
decorateDevError
(
thrownValue
:
unknown
)
{
const
error
=
coerceError
(
thrownValue
)
setOwnerStackIfAvailable
(
error
)
// TODO: change to passing down errorInfo later
// In development mode, pass along the component stack to the error
if
(
errorInfo
.
componentStack
)
{
setComponentStack
(
error
,
errorInfo
.
componentStack
)
}
return
error
}
packages/next/src/next-devtools/userspace/pages/pages-dev-overlay-setup.tsx
View file @
b2c751f4
...
...
@@ -6,7 +6,7 @@ import {
storeHydrationErrorStateFromConsoleArgs
,
}
from
'./hydration-error-state'
import
{
Router
}
from
'../../../client/router'
import
{
get
ComponentStack
,
get
OwnerStack
}
from
'../app/errors/stitched-error'
import
{
getOwnerStack
}
from
'../app/errors/stitched-error'
import
{
isRecoverableError
}
from
'../../../client/react-client-callbacks/on-recoverable-error'
import
{
getSquashedHydrationErrorDetails
}
from
'./hydration-error-state'
import
{
PagesDevOverlayErrorBoundary
}
from
'./pages-dev-overlay-error-boundary'
...
...
@@ -23,7 +23,6 @@ const usePagesDevOverlayBridge = () => {
// NDT uses a different React instance so it's not technically a state update
// scheduled from useInsertionEffect.
renderPagesDevOverlay
(
getComponentStack
,
getOwnerStack
,
getSquashedHydrationErrorDetails
,
isRecoverableError
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment