serverless/serverless · error · Error
Path not found: ${product}/${docPath}
Error message
Path not found: ${product}/${docPath} What it means
Error "Path not found: ${product}/${docPath}" thrown in serverless/serverless.
Source
Thrown at packages/mcp/src/tools/docs.js:113
'Contents of all files in this directory:',
'',
].join('\n')
// Append all file contents
let fileContents = ''
for (const file of files) {
const filePath = path.join(fullPath, file)
const content = await fs.readFile(filePath, 'utf-8')
fileContents += `\n\n# ${file}\n\n${content}`
}
return dirListing + fileContents
}
// If it's a file, just read it
return fs.readFile(fullPath, 'utf-8')
} catch (error) {
throw new Error(`Path not found: ${product}/${docPath}`)
}
}
/**
* Finds the nearest existing directory and lists its contents
* @param {string} product - The product (sf)
* @param {string} docPath - Path to look for
* @param {string} availablePaths - String containing available paths
* @returns {Promise<string>} - Formatted string with suggestions
*/
async function findNearestDirectory(product, docPath, availablePaths) {
if (!docsBaseDirs[product]) {
throw new Error(`Invalid product: ${product}. Must be: sf`)
}
const normalizedPath = normalizeDocPath(product, docPath)
const { isWithinBase } = resolvePathInBase(
docsBaseDirs[product],View on GitHub (pinned to b9d7ea51c8)
Solutions
- Check the requested documentation path exists; list available docs for the product to find a valid path.
When it happens
Trigger: Thrown at packages/mcp/src/tools/docs.js:113 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of serverless/serverless@b9d7ea51c8 (2026-08-13).
Data as JSON: /api/errors/bed4948baac5c6f3.
Report an issue: GitHub.