-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzip_pagination_serverless.11ty.js-BROKEN
74 lines (69 loc) · 3.44 KB
/
zip_pagination_serverless.11ty.js-BROKEN
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
class ZipFirstVisit {
data() {
return {
pagination: {
data: "zipcodes",
size: 1,
alias: "documentData",
addAllPagesToCollections: true,
},
tags: ["zips", "pages"],
layout: "layouts/standard_header_footer.liquid",
permalink: (arbitraryParameterName) => {
return {
// ERROR MESSAGE: the "path" argument must be of type string. Received type boolean (false)
firstrequestrender: `/zip_firstvisit/${arbitraryParameterName.pagination.items[0].post_code}/index.html`,
};
},
eleventyComputed: {
title: (arbitraryParameterName) =>
`${arbitraryParameterName.documentData.place_name} (built at site-build time)`,
},
};
}
render(dataFromData) {
return `<h1 class="font-bold text-2xl">City of <b class="text-red-800">${
dataFromData.title
}</b>.</h1><p>Zip code is <b class="text-green-800">${
dataFromData.documentData.post_code
}</b>.</p><p>Last rebuild: <i class="text-purple-800">${this.nowstampstring()}</i>.</p>`;
}
}
module.exports = ZipFirstVisit;
/*
...
[11ty] Writing dist/index.html from ./src/computed_pseudo_pages/singleton_home_page.liquid
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Writing false from ./src/computed_pseudo_pages/zip_serverless.11ty.js
[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] > Having trouble writing template: false
`TemplateWriterWriteError` was thrown
[11ty] > The "path" argument must be of type string. Received type boolean (false)
`TypeError` was thrown:
[11ty] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type boolean (false)
at new NodeError (node:internal/errors:371:5)
at validateString (node:internal/validators:119:11)
at Object.parse (node:path:913:5)
at Template._write (C:\example\myrepo\node_modules\@11ty\eleventy\src\Template.js:775:36)
at C:\example\myrepo\node_modules\@11ty\eleventy\src\Template.js:855:21
at async Promise.all (index 0)
at async Promise.all (index 3)
at async Eleventy.executeBuild (C:\example\myrepo\node_modules\@11ty\eleventy\src\Eleventy.js:958:13)
[11ty] Benchmark (Data): `./src/_data/zipcodes.js` took 429ms (42.3%)
[11ty] Wrote 0 files in 0.80 seconds (v1.0.0-beta.3)
ERROR: "build:11ty" exited with 1.
*/