{"record":{"id":"e8226c0cd149f26b","repo":"vitest-dev/vitest","slug":"no-projects-were-found-in-relativefile-make","errorCode":null,"errorMessage":"No projects were found in \"${relativeFile}\". Make sure your configuration is correct.","messagePattern":"No projects were found in \"(.+?)\"\\. Make sure your configuration is correct\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/vitest/src/node/projects/resolveProjects.ts","lineNumber":468,"sourceCode":"      chain = [...chain, realConfigFile]\n      context.containerConfigFiles.push(configFile)\n    }\n\n    const childContext: ProjectsResolutionContext = {\n      ...context,\n      parentViteConfig: entry.viteConfig,\n      parentConfig: entry.projectConfig,\n      ancestors: [...context.ancestors, entry.projectConfig.name],\n      chain,\n    }\n    const children = await resolveDeclaredProjectEntries(childContext, definitions)\n    // the raw config was only needed to resolve this container's projects,\n    // which are all known by now; the resolved container config outlives this\n    // resolution (children keep its server alive), so don't let it retain the\n    // raw copy for the whole session\n    entry.projectConfig._rawTestConfig = undefined\n    if (!children.length) {\n      throw new Error(\n        `No projects were found in \"${relativeFile}\". Make sure your configuration is correct.`,\n      )\n    }\n    result.push(...children)\n  }\n  return result\n}\n\nfunction safeRealpath(path: string): string {\n  try {\n    return realpathSync(path)\n  }\n  catch {\n    return path\n  }\n}\n\n/**","sourceCodeStart":450,"sourceCodeEnd":486,"githubUrl":"https://github.com/vitest-dev/vitest/blob/1fa9837ec26533512fdcad8baebf249771bd340a/packages/vitest/src/node/projects/resolveProjects.ts#L450-L486","documentation":"After resolving a container's declared project entries, if the result is empty (no children were produced), Vitest throws naming the container's relativeFile. A container config declared 'projects' but resolved to nothing, which would silently produce zero tests, so it is treated as a configuration error.","triggerScenarios":"A config file declares 'projects: [...] ' but every entry resolves to nothing (empty globs, all filters excluded, or definitions that yield no projects).","commonSituations":"An empty projects array, a glob that matches no files, all entries being hidden/filtered, or a projects function that returns nothing.","solutions":["Verify the container's 'projects' definition actually yields entries.","Check globs/paths in the projects definition resolve to real files/configs.","Remove filters that hide every project for this container, or remove the empty container.","Run with verbose logging to see what each projects entry resolved to."],"exampleFix":"// before\nexport default defineConfig({ projects: [] })\n// after\nexport default defineConfig({ projects: ['./packages/*'] })","handlingStrategy":"validation","validationCode":"// Ensure a container's projects definition resolves to something.\nfunction assertNonEmpty<T>(items: T[], container: string) {\n  if (!items.length) throw new Error(`Container \"${container}\" declared projects but resolved none.`)\n}","typeGuard":"const hasChildren = <T>(items: T[]): items is [T, ...T[]] => items.length > 0","tryCatchPattern":null,"preventionTips":["Verify globs in projects definitions match real files.","Avoid empty projects arrays in container configs.","Remove containers that no longer declare children."],"tags":["projects","config","workspace","empty"],"backgroundTag":null,"analyzedSha":"1fa9837ec26533512fdcad8baebf249771bd340a","analyzedAt":"2026-08-11T16:11:39.638Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}