n8n-io/n8n · warning
Third-party licenses file not found
Error message
Third-party licenses file not found
What it means
Not an thrown Error object but a plain-text 404 response body from GET /third-party-licenses. getThirdPartyLicenses reads THIRD_PARTY_LICENSES.md from CLI_DIR and, when the file is missing or unreadable from disk (e.g. a broken install or packaging step that did not ship the file), it catches the read failure and returns HTTP 404 with this string. It indicates the deployment artifact is incomplete, not an auth or request problem.
Solutions
- Run the build/license-extraction step that produces THIRD_PARTY_LICENSES.md so it lands in CLI_DIR.
- Ensure the deployment image copies the generated file into the CLI distribution directory.
- Verify CLI_DIR resolution on the host if a custom working dir is set.
Defensive patterns
Strategy: fallback
Validate before calling
// Optional: probe for the file's existence is not exposed; treat 404 as non-fatal.
async function getLicensesSafely(api) {
const res = await api.get('/third-party-licenses');
return res.status === 404 ? null : res.body;
} Try / catch
try {
await api.get('/third-party-licenses');
} catch (e) {
if (e.status === 404 && /Third-party licenses file not found/.test(e.message)) {
// regenerate/bundle the asset; surface a soft 'not available' in the UI
} else { throw e; }
} Prevention
- Run the license-extraction build step in CI.
- Include THIRD_PARTY_LICENSES.md in deployment images.
When it happens
Trigger: GET /third-party-licenses when the THIRD_PARTY_LICENSES.md file is absent from CLI_DIR at runtime.
Common situations: Build step that generates/bundles the licenses file was skipped or failed; a slim/custom deployment image omitted the asset; CLI_DIR resolves to an unexpected path.
Related errors
- Failed to load headers file
- Agent " " requires a model
- Agent " " requires instructions
- Failed to parse node types from
- Local computer-use build not found at
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/97dcd5acda69fcee.
Report an issue: GitHub.
Appendix: source
Thrown at packages/cli/src/controllers/third-party-licenses.controller.ts:23
import { CLI_DIR } from '@/constants';
@RestController('/third-party-licenses')
export class ThirdPartyLicensesController {
/**
* Get third-party licenses content
* Requires authentication to access
*/
@Get('/')
async getThirdPartyLicenses(_: Request, res: Response) {
const licenseFile = resolve(CLI_DIR, 'THIRD_PARTY_LICENSES.md');
try {
const content = await readFile(licenseFile, 'utf-8');
res.setHeader('Content-Type', 'text/markdown; charset=utf-8');
res.send(content);
} catch {
res.status(404).send('Third-party licenses file not found');
}
}
}
View on GitHub (pinned to 5ac6606e81)