FlowiseAI/Flowise · warning · Error
No relative links found
Error message
No relative links found
What it means
After resolving pages via webCrawl, xmlScrape, or selectedLinks.slice, the resulting array is empty. This means there is nothing for CheerioWebBaseLoader to scrape. webCrawl/xmlScrape produced no links, OR selectedLinks after slicing produced nothing (e.g., limit=0 path uses undefined slice which keeps all, but an empty input array yields empty).
Source
Thrown at packages/components/nodes/documentloaders/Cheerio/Cheerio.ts:199
}
let docs: IDocument[] = []
if (relativeLinksMethod) {
if (process.env.DEBUG === 'true') options.logger.info(`[${orgId}]: Start CheerioWebBaseLoader ${relativeLinksMethod}`)
// if limit is 0 we don't want it to default to 10 so we check explicitly for null or undefined
// so when limit is 0 we can fetch all the links
if (limit === null || limit === undefined) limit = 10
else if (limit < 0) throw new Error('Limit cannot be less than 0')
const pages: string[] =
selectedLinks && selectedLinks.length > 0
? selectedLinks.slice(0, limit === 0 ? undefined : limit)
: relativeLinksMethod === 'webCrawl'
? await webCrawl(url, limit)
: await xmlScrape(url, limit)
if (process.env.DEBUG === 'true')
options.logger.info(`[${orgId}]: CheerioWebBaseLoader pages: ${JSON.stringify(pages)}, length: ${pages.length}`)
if (!pages || pages.length === 0) throw new Error('No relative links found')
for (const page of pages) {
docs.push(...(await cheerioLoader(page)))
}
if (process.env.DEBUG === 'true') options.logger.info(`[${orgId}]: Finish CheerioWebBaseLoader ${relativeLinksMethod}`)
} else if (selectedLinks && selectedLinks.length > 0) {
if (process.env.DEBUG === 'true')
options.logger.info(
`[${orgId}]: CheerioWebBaseLoader pages: ${JSON.stringify(selectedLinks)}, length: ${selectedLinks.length}`
)
for (const page of selectedLinks.slice(0, limit)) {
docs.push(...(await cheerioLoader(page)))
}
} else {
docs = await cheerioLoader(url)
}
if (metadata) {
const parsedMetadata = typeof metadata === 'object' ? metadata : JSON.parse(metadata)View on GitHub (pinned to abe4a8601a)
Solutions
- If using xmlScrape, verify https://<host>/sitemap.xml exists and is non-empty.
- Switch relativeLinksMethod or provide explicit selectedLinks pointing at known page URLs.
- Lower the limit or remove it (0 = all) in case slicing dropped everything.
- Check that the seed URL itself returns HTML with anchor tags via curl.
Defensive patterns
Strategy: fallback
Validate before calling
async function probeSitemap(seedUrl: string): Promise<boolean> {
try {
const root = new URL(seedUrl)
const sitemap = new URL('/sitemap.xml', root)
const res = await fetch(sitemap.toString(), { method: 'GET' })
if (!res.ok) return false
const text = await res.text()
return /<urlset|<sitemapindex/i.test(text) && /<loc>/i.test(text)
} catch { return false }
}
// if (relativeLinksMethod === 'xmlScrape' && !await probeSitemap(url)) warn user Type guard
function hasPages(arr: unknown): arr is string[] {
return Array.isArray(arr) && arr.every((x) => typeof x === 'string') && arr.length > 0
} Try / catch
try {
// run cheerio init
} catch (error) {
const msg = error instanceof Error ? error.message : String(error)
if (/No relative links found/.test(msg)) {
// fall back to scraping the seed URL directly
docs.push(...(await cheerioLoader(url)))
} else throw error
} Prevention
- For xmlScrape, confirm a non-empty /sitemap.xml exists.
- Provide explicit selectedLinks when the site has few static anchors.
- Crawl a known-good seed URL with a generous limit first to validate link discovery.
When it happens
Trigger: Target site has no internal links matching the crawl rules; sitemap.xml is missing or empty (xmlScrape returns []); selectedLinks input array was empty; the seed URL blocks crawlers or returns a JS-only page with no static links.
Common situations: Pointing xmlScrape at a site with no /sitemap.xml; webCrawl on a SPA whose links are runtime-rendered; robots.txt or server blocks the user agent.
Related errors
- Limit cannot be less than 0
- No relative links found
- No relative links found
- Invalid URL
- Failed to scrape URL. Error: ${responseData.error}
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/ba3e65d26cf8c2dc.
Report an issue: GitHub.