vercel/next.js · error
Pattern "${patterns.join(',')}" did not match any files
Error message
Pattern "${patterns.join(',')}" did not match any files What it means
resolveBuildPaths globs the project with combined include/exclude patterns (for debug build path selection) and warns when the glob matched no files — i.e. the user-supplied pattern(s) referenced nothing on disk; an empty match list is returned.
Source
Thrown at packages/next/src/lib/resolve-build-paths.ts:91
// Default to matching all files when only negation patterns are provided.
if (includePatterns.length === 0 && excludePatterns.length > 0) {
includePatterns.push('**')
}
// Combine patterns using brace expansion: {pattern1,pattern2}
const combinedPattern =
includePatterns.length === 1
? includePatterns[0]
: `{${includePatterns.join(',')}}`
try {
const matches = (await glob(combinedPattern, {
cwd: projectDir,
ignore: excludePatterns,
})) as string[]
if (matches.length === 0) {
Log.warn(`Pattern "${patterns.join(',')}" did not match any files`)
}
for (const file of matches) {
if (!fs.statSync(path.join(projectDir, file)).isDirectory()) {
categorizeAndAddPath(file, appPaths, pagePaths, validFileMatcher)
}
}
} catch (error) {
throw new Error(
`Failed to resolve pattern "${patterns.join(',')}": ${
isError(error) ? error.message : String(error)
}`
)
}
return {
appPaths: Array.from(appPaths).sort(),
pagePaths: Array.from(pagePaths).sort(),View on GitHub (pinned to 0eb3775416)
Solutions
- Fix the glob pattern so it matches existing files, or remove the pattern from the build paths configuration.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/next/src/lib/resolve-build-paths.ts:91 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19).
Data as JSON: /api/errors/e572b67c77c56140.
Report an issue: GitHub.