{"record":{"id":"972be5f6f4fbbfca","repo":"facebook/docusaurus","slug":"pluginidlogprefix-no-docs-found-in-path-docs","errorCode":null,"errorMessage":"${pluginIdLogPrefix}: no docs found in path=${docsDir}.","messagePattern":"(.+?): no docs found in path=(.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/docusaurus-plugin-content-docs/src/cli.ts","lineNumber":109,"sourceCode":"        i18n.path,\n        getLocaleConfig(i18n, locale).path,\n      );\n      // Copy docs files.\n      const docsDir =\n        locale === i18n.defaultLocale\n          ? path.resolve(siteDir, docsPath)\n          : getDocsDirPathLocalized({\n              localizationDir,\n              pluginId,\n              versionName: CURRENT_VERSION_NAME,\n            });\n\n      if (\n        !(await fs.pathExists(docsDir)) ||\n        (await fs.readdir(docsDir)).length === 0\n      ) {\n        if (locale === i18n.defaultLocale) {\n          throw new Error(\n            logger.interpolate`${pluginIdLogPrefix}: no docs found in path=${docsDir}.`,\n          );\n        } else {\n          logger.warn`${pluginIdLogPrefix}: no docs found in path=${docsDir}. Skipping.`;\n          return;\n        }\n      }\n\n      const newVersionDir =\n        locale === i18n.defaultLocale\n          ? getVersionDocsDirPath(siteDir, pluginId, version)\n          : getDocsDirPathLocalized({\n              localizationDir,\n              pluginId,\n              versionName: version,\n            });\n      await fs.copy(docsDir, newVersionDir);\n","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/facebook/docusaurus/blob/3f483e80e326cc646b54b83d564b3f0c4881b9a6/packages/docusaurus-plugin-content-docs/src/cli.ts#L91-L127","documentation":"Thrown by the docs CLI version command when, for the default locale, the resolved docs directory does not exist or is empty. The plugin needs at least one source doc to cut a version. Non-default locales only emit a warning and are skipped, but the default locale is required.","triggerScenarios":"Running docs:version when docsDir (resolved from options.path or localized path) does not exist or contains no files. fs.pathExists is false or readdir length is 0.","commonSituations":"Configured docs `path` points to a non-existent or empty folder; you ran the version command before authoring any docs; or the docs were moved/deleted.","solutions":["Verify the docs plugin `path` option in docusaurus.config.js.","Add at least one markdown file to the docs directory.","Re-run the version command once docs exist."],"exampleFix":"// before — docs.path points to a folder with no files\n// after — add blog/intro.md and confirm path matches the folder","handlingStrategy":"validation","validationCode":"import fs from 'fs-extra';\nconst exists = await fs.pathExists(docsDir);\nconst isEmpty = exists ? (await fs.readdir(docsDir)).length === 0 : true;\nif (isEmpty) throw new Error(`No docs to version in ${docsDir}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm docsDir has files before running docs:version.","Pin the docs plugin `path` option explicitly in config."],"tags":["docs","versioning","cli","filesystem"],"backgroundTag":null,"analyzedSha":"3f483e80e326cc646b54b83d564b3f0c4881b9a6","analyzedAt":"2026-08-12T13:25:04.382Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}