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
3bf29d03
Unverified
Commit
3bf29d03
authored
Aug 20, 2026
by
David Ilie
Committed by
GitHub
Aug 21, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report missing root layouts in webpack
parent
ba9f073c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
33 additions
and
477 deletions
+33
-477
index.ts
...s/next/src/build/webpack/loaders/next-app-loader/index.ts
+6
-59
verify-root-layout.ts
packages/next/src/lib/verify-root-layout.ts
+0
-146
hot-reloader-webpack.ts
packages/next/src/server/dev/hot-reloader-webpack.ts
+0
-4
layout.js
...yout/app-find-available-dir/(group)/route/first/layout.js
+0
-7
page.js
...layout/app-find-available-dir/(group)/route/first/page.js
+0
-3
page.js
...app-find-available-dir/(group)/route/second/inner/page.js
+0
-3
page.js
...p-dir/create-root-layout/app-group-layout/(group)/page.js
+0
-3
create-root-layout.test.ts
...e2e/app-dir/create-root-layout/create-root-layout.test.ts
+27
-251
next-server-nft.test.ts
test/production/next-server-nft/next-server-nft.test.ts
+0
-1
No files found.
packages/next/src/build/webpack/loaders/next-app-loader/index.ts
View file @
3bf29d03
...
@@ -13,8 +13,6 @@ import type { ModuleTuple, CollectedMetadata } from '../metadata/types'
...
@@ -13,8 +13,6 @@ import type { ModuleTuple, CollectedMetadata } from '../metadata/types'
import
path
from
'path'
import
path
from
'path'
import
{
bold
}
from
'../../../../lib/picocolors'
import
{
bold
}
from
'../../../../lib/picocolors'
import
{
getModuleBuildInfo
}
from
'../get-module-build-info'
import
{
getModuleBuildInfo
}
from
'../get-module-build-info'
import
{
verifyRootLayout
}
from
'../../../../lib/verify-root-layout'
import
*
as
Log
from
'../../../output/log'
import
{
APP_DIR_ALIAS
}
from
'../../../../lib/constants'
import
{
APP_DIR_ALIAS
}
from
'../../../../lib/constants'
import
{
import
{
createMetadataExportsCode
,
createMetadataExportsCode
,
...
@@ -57,8 +55,6 @@ export type AppLoaderOptions = {
...
@@ -57,8 +55,6 @@ export type AppLoaderOptions = {
preferredRegion
:
string
|
string
[]
|
undefined
preferredRegion
:
string
|
string
[]
|
undefined
pageExtensions
:
PageExtensions
pageExtensions
:
PageExtensions
assetPrefix
:
string
assetPrefix
:
string
rootDir
?:
string
tsconfigPath
?:
string
isDev
?:
true
isDev
?:
true
basePath
:
string
basePath
:
string
nextConfigOutput
?:
NextConfig
[
'output'
]
nextConfigOutput
?:
NextConfig
[
'output'
]
...
@@ -681,8 +677,6 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
...
@@ -681,8 +677,6 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
allNormalizedAppPaths
:
allNormalizedAppPathsOption
,
allNormalizedAppPaths
:
allNormalizedAppPathsOption
,
pagePath
,
pagePath
,
pageExtensions
,
pageExtensions
,
rootDir
,
tsconfigPath
,
isDev
,
isDev
,
nextConfigOutput
,
nextConfigOutput
,
preferredRegion
,
preferredRegion
,
...
@@ -1011,7 +1005,7 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
...
@@ -1011,7 +1005,7 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
})
})
}
}
le
t
treeCodeResult
=
await
createTreeCodeFromPath
(
pagePath
,
{
cons
t
treeCodeResult
=
await
createTreeCodeFromPath
(
pagePath
,
{
page
,
page
,
resolveDir
,
resolveDir
,
resolver
,
resolver
,
...
@@ -1035,58 +1029,11 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
...
@@ -1035,58 +1029,11 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
const
isAppErrorRoute
=
page
===
UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY
const
isAppErrorRoute
=
page
===
UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY
if
(
!
treeCodeResult
.
rootLayout
&&
!
isGlobalNotFoundPath
&&
!
isAppErrorRoute
)
{
if
(
!
treeCodeResult
.
rootLayout
&&
!
isGlobalNotFoundPath
&&
!
isAppErrorRoute
)
{
if
(
!
isDev
)
{
let
message
=
`
${
bold
(
// If we're building and missing a root layout, exit the build
pagePath
.
replace
(
`
${
APP_DIR_ALIAS
}
/`
,
''
)
Log
.
error
(
)}
doesn't have a root layout. `
`
${
bold
(
message
+=
'To fix this error, make sure every page has a root layout.'
pagePath
.
replace
(
`
${
APP_DIR_ALIAS
}
/`
,
''
)
throw
new
Error
(
message
)
)}
doesn't have a root layout. To fix this error, make sure every page has a root layout.`
)
process
.
exit
(
1
)
}
else
{
// In dev we'll try to create a root layout
const
[
createdRootLayout
,
rootLayoutPath
]
=
await
verifyRootLayout
({
appDir
:
appDir
,
dir
:
rootDir
!
,
tsconfigPath
:
tsconfigPath
,
pagePath
,
pageExtensions
,
})
if
(
!
createdRootLayout
)
{
let
message
=
`
${
bold
(
pagePath
.
replace
(
`
${
APP_DIR_ALIAS
}
/`
,
''
)
)}
doesn't have a root layout. `
if
(
rootLayoutPath
)
{
message
+=
`We tried to create
${
bold
(
path
.
relative
(
this
.
_compiler
?.
context
??
''
,
rootLayoutPath
)
)}
for
you
but
something
went
wrong
.
`
} else {
message +=
'To fix this error, make sure every page has a root layout.'
}
throw new Error(message)
}
// Clear fs cache, get the new result with the created root layout.
if (this._compilation) filesInDirMapMap.get(this._compilation)?.clear()
treeCodeResult = await createTreeCodeFromPath(pagePath, {
page,
resolveDir,
resolver,
metadataResolver,
resolveParallelSegments,
hasChildRoutesForSegment,
getStaticSiblingSegments,
loaderContext: this,
pageExtensions,
basePath,
collectedDeclarations,
isGlobalNotFoundEnabled,
isDev: !!isDev,
})
}
}
}
const
pathname
=
new
AppPathnameNormalizer
().
normalize
(
page
)
const
pathname
=
new
AppPathnameNormalizer
().
normalize
(
page
)
...
...
packages/next/src/lib/verify-root-layout.ts
deleted
100644 → 0
View file @
ba9f073c
import
path
from
'path'
import
*
as
Log
from
'../build/output/log'
import
{
promises
as
fs
}
from
'fs'
import
{
bold
}
from
'./picocolors'
import
{
APP_DIR_ALIAS
}
from
'./constants'
import
type
{
PageExtensions
}
from
'../build/page-extensions-type'
const
globOrig
=
require
(
'next/dist/compiled/glob'
)
as
typeof
import
(
'next/dist/compiled/glob'
)
const
glob
=
(
cwd
:
string
,
pattern
:
string
):
Promise
<
string
[]
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
globOrig
(
pattern
,
{
cwd
},
(
err
,
files
)
=>
{
if
(
err
)
{
return
reject
(
err
)
}
resolve
(
files
)
})
})
}
function
getRootLayout
(
isTs
:
boolean
)
{
if
(
isTs
)
{
return
`export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
`
}
return
`export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
`
}
export
async
function
verifyRootLayout
({
dir
,
appDir
,
tsconfigPath
,
pagePath
,
pageExtensions
,
}:
{
dir
:
string
appDir
:
string
tsconfigPath
:
string
|
undefined
pagePath
:
string
pageExtensions
:
PageExtensions
}):
Promise
<
[
boolean
,
string
|
undefined
]
>
{
let
rootLayoutPath
:
string
|
undefined
try
{
const
layoutFiles
=
await
glob
(
appDir
,
`**/layout.{
${
pageExtensions
.
join
(
','
)}
}`
)
const
isFileUnderAppDir
=
pagePath
.
startsWith
(
`
${
APP_DIR_ALIAS
}
/`
)
const
normalizedPagePath
=
pagePath
.
replace
(
`
${
APP_DIR_ALIAS
}
/`
,
''
)
const
pagePathSegments
=
normalizedPagePath
.
split
(
'/'
)
// Find an available dir to place the layout file in, the layout file can't affect any other layout.
// Place the layout as close to app/ as possible.
let
availableDir
:
string
|
undefined
if
(
isFileUnderAppDir
)
{
if
(
layoutFiles
.
length
===
0
)
{
// If there's no other layout file we can place the layout file in the app dir.
// However, if the page is within a route group directly under app (e.g. app/(routegroup)/page.js)
// prefer creating the root layout in that route group.
const
firstSegmentValue
=
pagePathSegments
[
0
]
availableDir
=
firstSegmentValue
.
startsWith
(
'('
)
?
firstSegmentValue
:
''
}
else
{
pagePathSegments
.
pop
()
// remove the page from segments
let
currentSegments
:
string
[]
=
[]
for
(
const
segment
of
pagePathSegments
)
{
currentSegments
.
push
(
segment
)
// Find the dir closest to app/ where a layout can be created without affecting other layouts.
if
(
!
layoutFiles
.
some
((
file
)
=>
file
.
startsWith
(
currentSegments
.
join
(
'/'
))
)
)
{
availableDir
=
currentSegments
.
join
(
'/'
)
break
}
}
}
}
else
{
availableDir
=
''
}
if
(
typeof
availableDir
===
'string'
)
{
const
tsConfigFileName
=
tsconfigPath
||
'tsconfig.json'
const
resolvedTsConfigPath
=
path
.
join
(
dir
,
tsConfigFileName
)
const
hasTsConfig
=
await
fs
.
access
(
resolvedTsConfigPath
).
then
(
()
=>
true
,
()
=>
false
)
rootLayoutPath
=
path
.
join
(
appDir
,
availableDir
,
`layout.
${
hasTsConfig
?
'tsx'
:
'js'
}
`
)
await
fs
.
writeFile
(
rootLayoutPath
,
getRootLayout
(
hasTsConfig
))
Log
.
warn
(
`Your page
${
bold
(
`app/
${
normalizedPagePath
}
`
)}
did not have a root layout. We created
${
bold
(
`app
${
rootLayoutPath
.
replace
(
appDir
,
''
)}
`
)}
for you.`
)
// Created root layout
return
[
true
,
rootLayoutPath
]
}
}
catch
(
e
)
{
console
.
error
(
e
)
}
// Didn't create root layout
return
[
false
,
rootLayoutPath
]
}
packages/next/src/server/dev/hot-reloader-webpack.ts
View file @
3bf29d03
...
@@ -1040,9 +1040,7 @@ export default class HotReloaderWebpack implements NextJsHotReloaderInterface {
...
@@ -1040,9 +1040,7 @@ export default class HotReloaderWebpack implements NextJsHotReloaderInterface {
),
),
appDir
:
this
.
appDir
!
,
appDir
:
this
.
appDir
!
,
pageExtensions
:
this
.
config
.
pageExtensions
,
pageExtensions
:
this
.
config
.
pageExtensions
,
rootDir
:
this
.
dir
,
isDev
:
true
,
isDev
:
true
,
tsconfigPath
:
this
.
config
.
typescript
.
tsconfigPath
,
basePath
:
this
.
config
.
basePath
,
basePath
:
this
.
config
.
basePath
,
assetPrefix
:
this
.
config
.
assetPrefix
,
assetPrefix
:
this
.
config
.
assetPrefix
,
nextConfigOutput
:
this
.
config
.
output
,
nextConfigOutput
:
this
.
config
.
output
,
...
@@ -1164,9 +1162,7 @@ export default class HotReloaderWebpack implements NextJsHotReloaderInterface {
...
@@ -1164,9 +1162,7 @@ export default class HotReloaderWebpack implements NextJsHotReloaderInterface {
pagePath
,
pagePath
,
appDir
:
this
.
appDir
!
,
appDir
:
this
.
appDir
!
,
pageExtensions
:
this
.
config
.
pageExtensions
,
pageExtensions
:
this
.
config
.
pageExtensions
,
rootDir
:
this
.
dir
,
isDev
:
true
,
isDev
:
true
,
tsconfigPath
:
this
.
config
.
typescript
.
tsconfigPath
,
basePath
:
this
.
config
.
basePath
,
basePath
:
this
.
config
.
basePath
,
assetPrefix
:
this
.
config
.
assetPrefix
,
assetPrefix
:
this
.
config
.
assetPrefix
,
nextConfigOutput
:
this
.
config
.
output
,
nextConfigOutput
:
this
.
config
.
output
,
...
...
test/e2e/app-dir/create-root-layout/app-find-available-dir/(group)/route/first/layout.js
deleted
100644 → 0
View file @
ba9f073c
export
default
function
RootLayout
({
children
})
{
return
(
<
html
>
<
body
>
{
children
}
<
/body
>
<
/html
>
)
}
test/e2e/app-dir/create-root-layout/app-find-available-dir/(group)/route/first/page.js
deleted
100644 → 0
View file @
ba9f073c
export
default
function
Page
()
{
return
<
p
id
=
"page-text"
>
Hello
world
<
/p
>
}
test/e2e/app-dir/create-root-layout/app-find-available-dir/(group)/route/second/inner/page.js
deleted
100644 → 0
View file @
ba9f073c
export
default
function
Page
()
{
return
<
p
id
=
"page-text"
>
Hello
world
<
/p
>
}
test/e2e/app-dir/create-root-layout/app-group-layout/(group)/page.js
deleted
100644 → 0
View file @
ba9f073c
export
default
function
Page
()
{
return
<
p
id
=
"page-text"
>
Hello
world
<
/p
>
}
test/e2e/app-dir/create-root-layout/create-root-layout.test.ts
View file @
3bf29d03
import
path
from
'path'
import
path
from
'path'
import
{
FileRef
,
nextTestSetup
}
from
'e2e-utils'
import
{
FileRef
,
nextTestSetup
}
from
'e2e-utils'
import
{
check
,
retry
}
from
'next-test-utils'
import
{
retry
}
from
'next-test-utils'
import
stripAnsi
from
'strip-ansi'
import
stripAnsi
from
'strip-ansi'
// Skip on Turbopack because the user should create the layout manually
describe
(
'app-dir missing root layout'
,
()
=>
{
;(
process
.
env
.
IS_TURBOPACK_TEST
?
describe
.
skip
:
describe
)(
const
{
next
,
isNextDev
,
skipped
}
=
nextTestSetup
({
'app-dir create root layout'
,
files
:
{
()
=>
{
app
:
new
FileRef
(
path
.
join
(
__dirname
,
'app'
)),
const
isDev
=
(
global
as
any
).
isNextDev
'next.config.js'
:
new
FileRef
(
path
.
join
(
__dirname
,
'next.config.js'
)),
},
skipDeployment
:
true
,
skipStart
:
true
,
})
if
((
global
as
any
).
isNextDeploy
)
{
if
(
skipped
)
return
it
(
'should skip next deploy for now'
,
()
=>
{})
return
}
if
(
isDev
)
{
describe
(
'page.js'
,
()
=>
{
describe
(
'root layout in app'
,
()
=>
{
const
{
next
}
=
nextTestSetup
({
files
:
{
app
:
new
FileRef
(
path
.
join
(
__dirname
,
'app'
)),
'next.config.js'
:
new
FileRef
(
path
.
join
(
__dirname
,
'next.config.js'
)
),
},
})
it
(
'create root layout'
,
async
()
=>
{
const
outputIndex
=
next
.
cliOutput
.
length
const
browser
=
await
next
.
browser
(
'/route'
)
expect
(
await
browser
.
elementById
(
'page-text'
).
text
()).
toBe
(
'Hello world!'
)
await
check
(
()
=>
stripAnsi
(
next
.
cliOutput
.
slice
(
outputIndex
)),
/did not have a root layout/
)
expect
(
stripAnsi
(
next
.
cliOutput
.
slice
(
outputIndex
))).
toMatch
(
'Your page app/route/page.js did not have a root layout. We created app/layout.js for you.'
)
expect
(
await
next
.
readFile
(
'app/layout.js'
)).
toMatchInlineSnapshot
(
`
"export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
"
`
)
})
})
describe
(
'root layout in route group'
,
()
=>
{
const
{
next
}
=
nextTestSetup
({
files
:
{
app
:
new
FileRef
(
path
.
join
(
__dirname
,
'app-group-layout'
)),
'next.config.js'
:
new
FileRef
(
path
.
join
(
__dirname
,
'next.config.js'
)
),
},
})
it
(
'create root layout'
,
async
()
=>
{
const
outputIndex
=
next
.
cliOutput
.
length
const
browser
=
await
next
.
browser
(
'/'
)
expect
(
await
browser
.
elementById
(
'page-text'
).
text
()).
toBe
(
it
(
'reports a compiler error without modifying the app'
,
async
()
=>
{
'Hello world'
if
(
isNextDev
)
{
)
await
next
.
start
(
)
await
check
(
const
response
=
await
next
.
fetch
(
'/route'
)
()
=>
stripAnsi
(
next
.
cliOutput
.
slice
(
outputIndex
)),
expect
(
response
.
status
).
toBe
(
500
)
/did not have a root layout/
)
expect
(
stripAnsi
(
next
.
cliOutput
.
slice
(
outputIndex
))).
toInclude
(
'Your page app/(group)/page.js did not have a root layout. We created app/(group)/layout.js for you.'
)
expect
(
await
next
.
readFile
(
'app/(group)/layout.js'
))
.
toMatchInlineSnapshot
(
`
"export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
"
`
)
})
})
describe
(
'find available dir'
,
()
=>
{
const
{
next
}
=
nextTestSetup
({
files
:
{
app
:
new
FileRef
(
path
.
join
(
__dirname
,
'app-find-available-dir'
)),
'next.config.js'
:
new
FileRef
(
path
.
join
(
__dirname
,
'next.config.js'
)
),
},
})
it
(
'create root layout'
,
async
()
=>
{
const
outputIndex
=
next
.
cliOutput
.
length
const
browser
=
await
next
.
browser
(
'/route/second/inner'
)
expect
(
await
browser
.
elementById
(
'page-text'
).
text
()).
toBe
(
'Hello world'
)
await
check
(
()
=>
stripAnsi
(
next
.
cliOutput
.
slice
(
outputIndex
)),
/did not have a root layout/
)
expect
(
stripAnsi
(
next
.
cliOutput
.
slice
(
outputIndex
))).
toInclude
(
'Your page app/(group)/route/second/inner/page.js did not have a root layout. We created app/(group)/route/second/layout.js for you.'
)
expect
(
await
next
.
readFile
(
'app/(group)/route/second/layout.js'
))
.
toMatchInlineSnapshot
(
`
"export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
"
`
)
})
})
})
describe
(
'page.tsx'
,
()
=>
{
await
retry
(
async
()
=>
{
const
{
next
}
=
nextTestSetup
({
files
:
{
'app/page.tsx'
:
new
FileRef
(
path
.
join
(
__dirname
,
'app/route/page.js'
)
),
'next.config.js'
:
new
FileRef
(
path
.
join
(
__dirname
,
'next.config.js'
)
),
},
})
it
(
'create root layout'
,
async
()
=>
{
const
outputIndex
=
next
.
cliOutput
.
length
const
browser
=
await
next
.
browser
(
'/'
)
expect
(
await
browser
.
elementById
(
'page-text'
).
text
()).
toBe
(
'Hello world!'
)
await
check
(
()
=>
stripAnsi
(
next
.
cliOutput
.
slice
(
outputIndex
)),
/did not have a root layout/
)
expect
(
stripAnsi
(
next
.
cliOutput
.
slice
(
outputIndex
))).
toInclude
(
'Your page app/page.tsx did not have a root layout. We created app/layout.tsx for you.'
)
expect
(
await
next
.
readFile
(
'app/layout.tsx'
)).
toMatchInlineSnapshot
(
`
"export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
"
`
)
})
})
}
else
{
describe
(
'build'
,
()
=>
{
const
{
next
}
=
nextTestSetup
({
skipStart
:
true
,
files
:
{
'app/page.js'
:
new
FileRef
(
path
.
join
(
__dirname
,
'app/route/page.js'
)
),
'next.config.js'
:
new
FileRef
(
path
.
join
(
__dirname
,
'next.config.js'
)
),
},
})
it
(
'should break the build if a page is missing root layout'
,
async
()
=>
{
await
expect
(
next
.
start
()).
rejects
.
toThrow
(
'next build failed'
)
expect
(
stripAnsi
(
next
.
cliOutput
)).
toInclude
(
"page.js doesn't have a root layout. To fix this error, make sure every page has a root layout."
)
})
})
}
}
)
;(
process
.
env
.
IS_TURBOPACK_TEST
?
describe
:
describe
.
skip
)(
'app-dir missing root layout'
,
()
=>
{
const
{
next
,
isNextDev
,
skipped
}
=
nextTestSetup
({
files
:
{
app
:
new
FileRef
(
path
.
join
(
__dirname
,
'app'
)),
'next.config.js'
:
new
FileRef
(
path
.
join
(
__dirname
,
'next.config.js'
)),
},
skipDeployment
:
true
,
skipStart
:
true
,
})
if
(
skipped
)
return
it
(
'reports a compiler error without modifying the app'
,
async
()
=>
{
if
(
isNextDev
)
{
await
next
.
start
()
const
response
=
await
next
.
fetch
(
'/route'
)
expect
(
response
.
status
).
toBe
(
500
)
await
retry
(
async
()
=>
{
expect
(
stripAnsi
(
next
.
cliOutput
)).
toContain
(
"route/page.js doesn't have a root layout. To fix this error, make sure every page has a root layout."
)
})
}
else
{
await
expect
(
next
.
start
()).
rejects
.
toThrow
(
'next build failed'
)
expect
(
stripAnsi
(
next
.
cliOutput
)).
toContain
(
expect
(
stripAnsi
(
next
.
cliOutput
)).
toContain
(
"route/page.js doesn't have a root layout. To fix this error, make sure every page has a root layout."
"route/page.js doesn't have a root layout. To fix this error, make sure every page has a root layout."
)
)
}
})
}
else
{
await
expect
(
next
.
start
()).
rejects
.
toThrow
(
'next build failed'
)
expect
(
stripAnsi
(
next
.
cliOutput
)).
toContain
(
"route/page.js doesn't have a root layout. To fix this error, make sure every page has a root layout."
)
}
expect
(
await
next
.
hasFile
(
'app/layout.js'
)).
toBe
(
false
)
expect
(
await
next
.
hasFile
(
'app/layout.js'
)).
toBe
(
false
)
})
})
}
})
)
test/production/next-server-nft/next-server-nft.test.ts
View file @
3bf29d03
...
@@ -360,7 +360,6 @@ async function readNormalizedNFT(next, name) {
...
@@ -360,7 +360,6 @@ async function readNormalizedNFT(next, name) {
"/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js",
"/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js",
"/node_modules/next/dist/lib/url.js",
"/node_modules/next/dist/lib/url.js",
"/node_modules/next/dist/lib/verify-partytown-setup.js",
"/node_modules/next/dist/lib/verify-partytown-setup.js",
"/node_modules/next/dist/lib/verify-root-layout.js",
"/node_modules/next/dist/lib/verify-typescript-setup.js",
"/node_modules/next/dist/lib/verify-typescript-setup.js",
"/node_modules/next/dist/lib/wait.js",
"/node_modules/next/dist/lib/wait.js",
"/node_modules/next/dist/lib/with-promise-cache.js",
"/node_modules/next/dist/lib/with-promise-cache.js",
...
...
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