remoteintech/remote-jobs · error

Invalid `company_size`: "${data.company_size}". Must be one

Error message

Invalid `company_size`: "${data.company_size}". Must be one of: ${VALID_COMPANY_SIZES.join(", ")}

What it means

Enum check at lines 127-131. If data.company_size is present but not in VALID_COMPANY_SIZES (keys of labels().companySize from src/_data/labels.js), the value is rejected. Allowed values include the likes of tiny, small, medium, large, enterprise, startup.

Source

Thrown at .github/scripts/validate-companies.js:129

    }
  }

  // Validate enum values (only if field exists)
  if (data.region && !VALID_REGIONS.includes(data.region)) {
    errors.push(
      `Invalid \`region\`: "${data.region}". Must be one of: ${VALID_REGIONS.join(", ")}`
    );
  }

  if (data.remote_policy && !VALID_REMOTE_POLICIES.includes(data.remote_policy)) {
    errors.push(
      `Invalid \`remote_policy\`: "${data.remote_policy}". Must be one of: ${VALID_REMOTE_POLICIES.join(", ")}`
    );
  }

  if (data.company_size && !VALID_COMPANY_SIZES.includes(data.company_size)) {
    errors.push(
      `Invalid \`company_size\`: "${data.company_size}". Must be one of: ${VALID_COMPANY_SIZES.join(", ")}`
    );
  }

  // Validate technologies array
  if (data.technologies && Array.isArray(data.technologies)) {
    for (const tech of data.technologies) {
      if (!VALID_TECHNOLOGIES.includes(tech)) {
        errors.push(
          `Invalid technology tag: "${tech}". Valid tags: ${VALID_TECHNOLOGIES.join(", ")}`
        );
      }
    }
  }

  // Validate slug matches filename
  if (data.slug) {
    const expectedSlug = basename(filePath, ".md");
    if (data.slug !== expectedSlug) {

View on GitHub (pinned to b1dd8deb19)

Solutions

  1. Pick the exact key from the error message's allowed list.
  2. Add a new size bucket to labels().companySize if the current taxonomy is insufficient.

Example fix

// before
company_size: 50
// after
company_size: small
Defensive patterns

Strategy: validation

Validate before calling

const VALID_COMPANY_SIZES = Object.keys(labels().companySize);
function validCompanySize(value) {
  return VALID_COMPANY_SIZES.includes(value);
}

Type guard

function isCompanySize(value) {
  return typeof value === 'string' && Object.keys(labels().companySize).includes(value);
}

Prevention

When it happens

Trigger: Contributor writes a number ('50') or free text ('mid-size'); casing error ('Small'); key was renamed in labels.js.

Common situations: New contributor assumes a numeric scale; outdated example; company grew and the contributor guessed a key that doesn't exist.

Related errors


AI-assisted analysis of remoteintech/remote-jobs@b1dd8deb19 (2026-08-13). Data as JSON: /api/errors/c4eb6fc726dd8855. Report an issue: GitHub.