The "path" argument must be of type string. Received type boolean (false)
Author: ryangittingsCreated Feb 13, 2023Updated May 13, 2026
Labelsneeds-triage
Operating system
macOS Ventura 13.0
Eleventy
2.0.0
Describe the bug
Original error stack trace: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type boolean (false)
at Template._write (/node_modules/@11ty/eleventy/src/Template.js:751:34)
Reproduction steps
- Use JS frontmatter as follows
---js
{
layout: "layouts/default.njk",
pagination: {
alias: "spage",
data: "pages",
size: 1,
addAllPagesToCollections: true,
},
eleventyComputed: {
title: (data) => data.spage.title,
eleventyNavigation: {
key: (data) => {
if (data.spage.navigation) {
return data.spage.navigation.key;
}
return null;
},
parent: (data) => {
if (data.spage.navigation && data.spage.navigation.parent) {
return data.spage.navigation.parent.navigation.key;
}
return null;
}
},
permalink: (data) => {
if (data.spage.slug) {
return `${data.spage.slug.current}index.html`;
}
return false;
}
}
}
---- Run build
- Error
Expected behavior
To build pages that have a slug, and to ignore ones with a false permalink
Reproduction URL
No response
Screenshots
No response
Source: 11ty/buildawesome