remoteintech/remote-jobs · error
Invalid `website` URL: "${data.website}". Must be a full URL
Error message
Invalid `website` URL: "${data.website}". Must be a full URL starting with https:// or http:// What it means
URL format check at lines 154-159 using isValidUrl (lines 192-199), which constructs `new URL(str)` and requires protocol === 'https:' or 'http:'. A website value without a scheme (`example.com`), with a non-http scheme (`ftp://`), or wrapped in angle brackets (`<https://...>`) fails. Note the `data.website &&` short-circuit means empty values are skipped here, but website is also a REQUIRED_FIELD so empty is already reported as missing.
Source
Thrown at .github/scripts/validate-companies.js:157
);
}
}
}
// Validate slug matches filename
if (data.slug) {
const expectedSlug = basename(filePath, ".md");
if (data.slug !== expectedSlug) {
errors.push(
`Slug "${data.slug}" does not match filename "${basename(filePath)}". The slug must be "${expectedSlug}".`
);
}
}
// Validate URL format
if (data.website && !isValidUrl(data.website)) {
errors.push(
`Invalid \`website\` URL: "${data.website}". Must be a full URL starting with https:// or http://`
);
}
if (data.careers_url && !isValidUrl(data.careers_url)) {
errors.push(
`Invalid \`careers_url\`: "${data.careers_url}". Must be a full URL starting with https:// or http://`
);
}
// Check required markdown sections
const bodyContent = content.replace(/^---[\s\S]*?---/, "");
for (const section of REQUIRED_SECTIONS) {
const sectionPattern = new RegExp(
`^##\\s+${escapeRegExp(section)}\\s*$`,
"m"
);
if (!sectionPattern.test(bodyContent)) {
errors.push(`Missing required section: "## ${section}"`);View on GitHub (pinned to b1dd8deb19)
Solutions
- Ensure the value starts with `https://` (preferred) or `http://`.
- Strip any wrapping angle brackets, quotes, or whitespace.
- Confirm the URL resolves in a browser before committing.
Example fix
// before website: acme.com // after website: https://acme.com
Defensive patterns
Strategy: validation
Validate before calling
function isValidUrl(str) {
try {
const u = new URL(str);
return u.protocol === 'https:' || u.protocol === 'http:';
} catch { return false; }
} Type guard
function isHttpUrl(str) {
return typeof str === 'string' && isValidUrl(str);
} Prevention
- Always paste URLs with the https:// scheme.
- Strip angle brackets and surrounding quotes before saving.
- Prefer https:// over http:// for new profiles.
When it happens
Trigger: Bare domain (`acme.com`); URL wrapped in markdown link brackets; URL with a leading space or trailing punctuation; non-string value that String-coerces into something URL can't parse.
Common situations: Contributor pastes a domain copied from a browser address bar that lost the scheme; autoformatter added angle brackets; URL with a stray smart-quote from a rich-text editor.
Related errors
- Invalid `careers_url`: "${data.careers_url}". Must be a full
- Usage: node validate-companies.js <file1.md> [file2.md ...]
- Missing YAML frontmatter. The file must start with `---` fol
- Missing required field: `${field}`
- Invalid `region`: "${data.region}". Must be one of: ${VALID_
AI-assisted analysis of remoteintech/remote-jobs@b1dd8deb19 (2026-08-13).
Data as JSON: /api/errors/3a5948912c51ce0c.
Report an issue: GitHub.