{"record":{"id":"e572b67c77c56140","repo":"vercel/next.js","slug":"pattern-patterns-join-did-not-match-any","errorCode":null,"errorMessage":"Pattern \"${patterns.join(',')}\" did not match any files","messagePattern":"Pattern \"(.+?)\" did not match any files","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/lib/resolve-build-paths.ts","lineNumber":91,"sourceCode":"  // Default to matching all files when only negation patterns are provided.\n  if (includePatterns.length === 0 && excludePatterns.length > 0) {\n    includePatterns.push('**')\n  }\n\n  // Combine patterns using brace expansion: {pattern1,pattern2}\n  const combinedPattern =\n    includePatterns.length === 1\n      ? includePatterns[0]\n      : `{${includePatterns.join(',')}}`\n\n  try {\n    const matches = (await glob(combinedPattern, {\n      cwd: projectDir,\n      ignore: excludePatterns,\n    })) as string[]\n\n    if (matches.length === 0) {\n      Log.warn(`Pattern \"${patterns.join(',')}\" did not match any files`)\n    }\n\n    for (const file of matches) {\n      if (!fs.statSync(path.join(projectDir, file)).isDirectory()) {\n        categorizeAndAddPath(file, appPaths, pagePaths, validFileMatcher)\n      }\n    }\n  } catch (error) {\n    throw new Error(\n      `Failed to resolve pattern \"${patterns.join(',')}\": ${\n        isError(error) ? error.message : String(error)\n      }`\n    )\n  }\n\n  return {\n    appPaths: Array.from(appPaths).sort(),\n    pagePaths: Array.from(pagePaths).sort(),","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/lib/resolve-build-paths.ts#L73-L109","documentation":"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.","triggerScenarios":"Thrown at packages/next/src/lib/resolve-build-paths.ts:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the glob pattern so it matches existing files, or remove the pattern from the build paths configuration."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}