{"record":{"id":"80a8981257e9c717","repo":"vercel/next.js","slug":"failed-to-resolve-pattern-patterns-join","errorCode":null,"errorMessage":"Failed to resolve pattern \"${patterns.join(',')}\": ${isError(error) ? error.message : String(error)}","messagePattern":"Failed to resolve pattern \"(.+?)\": (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/lib/resolve-build-paths.ts","lineNumber":100,"sourceCode":"      : `{${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(),\n  }\n}\n\n/**\n * When the project keeps its `app/` or `pages/` directory under `src/`, prepend\n * `src/` to bare patterns so the glob actually matches files on disk. Patterns\n * that already include the `src/` prefix are returned unchanged.\n */\nfunction addSrcPrefixIfNeeded(","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/lib/resolve-build-paths.ts#L82-L118","documentation":"Error boundary around glob resolution in resolveBuildPaths: expanding the combined include pattern (with excludes) against projectDir threw — glob syntax errors or filesystem access problems are the usual causes. The original error message is embedded so the failing pattern and cause stay visible.","triggerScenarios":"A configured build path glob pattern fails to resolve.","commonSituations":"An invalid glob in resolve-build-paths configuration or plugin paths.","solutions":["Fix the glob patterns so they resolve to existing paths; check for typos in the configured build paths."],"exampleFix":null,"handlingStrategy":"try-catch","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-23T08:17:48.524Z"}