{"record":{"id":"7806c6b8dd51ab1a","repo":"facebook/docusaurus","slug":"missing-project-organization-name-did-you-forget","errorCode":null,"errorMessage":"Missing project organization name. Did you forget to define \"organizationName\" in ${siteConfigPath}? You may also export it via the ORGANIZATION_NAME environment variable.","messagePattern":"Missing project organization name\\. Did you forget to define \"organizationName\" in (.+?)\\? You may also export it via the ORGANIZATION_NAME environment variable\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/docusaurus/src/commands/deploy.ts","lineNumber":139,"sourceCode":"    process.env.USE_SSH.toLowerCase() === 'true';\n\n  if (!gitUser && !useSSH) {\n    // If USE_SSH is unspecified: try inferring from repo URL\n    if (process.env.USE_SSH === undefined && hasSSHProtocol(sourceRepoUrl)) {\n      useSSH = true;\n    } else {\n      throw new Error(\n        'Please set the GIT_USER environment variable, or explicitly specify USE_SSH instead!',\n      );\n    }\n  }\n\n  const organizationName =\n    process.env.ORGANIZATION_NAME ??\n    process.env.CIRCLE_PROJECT_USERNAME ??\n    siteConfig.organizationName;\n  if (!organizationName) {\n    throw new Error(\n      `Missing project organization name. Did you forget to define \"organizationName\" in ${siteConfigPath}? You may also export it via the ORGANIZATION_NAME environment variable.`,\n    );\n  }\n  logger.info`organizationName: name=${organizationName}`;\n\n  const projectName =\n    process.env.PROJECT_NAME ??\n    process.env.CIRCLE_PROJECT_REPONAME ??\n    siteConfig.projectName;\n  if (!projectName) {\n    throw new Error(\n      `Missing project name. Did you forget to define \"projectName\" in ${siteConfigPath}? You may also export it via the PROJECT_NAME environment variable.`,\n    );\n  }\n  logger.info`projectName: name=${projectName}`;\n\n  // We never deploy on pull request.\n  const isPullRequest =","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/facebook/docusaurus/blob/3f483e80e326cc646b54b83d564b3f0c4881b9a6/packages/docusaurus/src/commands/deploy.ts#L121-L157","documentation":"Thrown by `docusaurus deploy` when it cannot resolve the GitHub organization/user that owns the deployment target repository. The deploy command resolves organizationName from three sources in order: the `ORGANIZATION_NAME` env var, the CircleCI-provided `CIRCLE_PROJECT_USERNAME`, then `siteConfig.organizationName`. If all three are unset/empty, deployment cannot proceed because the git remote URL and final website URL cannot be computed.","triggerScenarios":"Running `docusaurus deploy` (or `deploy` CLI command) without `organizationName` in `docusaurus.config.js`, without the `ORGANIZATION_NAME` env var, and outside CircleCI (so `CIRCLE_PROJECT_USERNAME` is also unset).","commonSituations":"New project forgetting to fill in `organizationName`; running deploy locally for the first time without env vars; CI provider other than CircleCI that does not set `CIRCLE_PROJECT_USERNAME`; config file accidentally deleted/overwritten the field.","solutions":["Add `organizationName: 'your-github-user-or-org'` to the exported config object in `docusaurus.config.js`/`.ts`.","Export `ORGANIZATION_NAME` in your shell or CI environment: `export ORGANIZATION_NAME=your-github-user-or-org`.","If on CircleCI, ensure the job has access to the built-in `CIRCLE_PROJECT_USERNAME` env var (it is set automatically for project builds).","Verify the config file you are deploying with is the one being loaded (use `--config` if you have multiple)."],"exampleFix":"// before (docusaurus.config.js)\nexport default {\n  url: 'https://example.com',\n  // organizationName missing\n};\n// after\nexport default {\n  url: 'https://your-org.github.io',\n  organizationName: 'your-org',\n  projectName: 'your-site',\n};","handlingStrategy":"validation","validationCode":"// before deploy: assert organizationName is resolvable\nimport fs from 'fs-extra';\nconst org = process.env.ORGANIZATION_NAME\n  ?? process.env.CIRCLE_PROJECT_USERNAME\n  ?? (await import('./docusaurus.config.js')).default.organizationName;\nif (!org) {\n  throw new Error('Set organizationName in config or ORGANIZATION_NAME env before deploy.');\n}","typeGuard":"function hasOrganizationName(cfg: any): cfg is { organizationName: string } {\n  return typeof cfg?.organizationName === 'string' && cfg.organizationName.length > 0;\n}","tryCatchPattern":"try {\n  await deploy(siteDir, cliOptions);\n} catch (e) {\n  if (/Missing project organization name/.test(e.message)) {\n    console.error('Set ORGANIZATION_NAME env or config.organizationName');\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["Add a CI pre-deploy step that asserts `organizationName` is non-empty.","Use a config validator (Docusaurus already Joi-validates the config field, but env-driven deploys do not).","Document the deploy env-var contract in your repo README."],"tags":["deploy","github-pages","config","env"],"backgroundTag":null,"analyzedSha":"3f483e80e326cc646b54b83d564b3f0c4881b9a6","analyzedAt":"2026-08-12T13:25:04.382Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}