Description
Describe the bug
When I have a global data file named tags.js
in the _data
directory, this odd error is thrown:
Problem writing Eleventy templates: (more in DEBUG output)
> entry.data.tags is not iterable
`TypeError` was thrown:
TypeError: entry.data.tags is not iterable
at TemplateMap.getMappedDependencies (/Users/TannerDolby/11ty-portfolio/node_modules/@11ty/eleventy/src/TemplateMap.js:109:38)
at TemplateMap.cache (/Users/TannerDolby/11ty-portfolio/node_modules/@11ty/eleventy/src/TemplateMap.js:278:30)
at TemplateWriter._createTemplateMap (/Users/TannerDolby/11ty-portfolio/node_modules/@11ty/eleventy/src/TemplateWriter.js:170:28)
It doesn't seem to be caused by any of my local files, so I was wondering if maybe anyone else encountered something like this. The only thing I could think of quickly was that the tags.js
filename is replacing some file local to 11ty with the same name. The error is thrown when the tags.js
file has content in it and when its completely empty.
To Reproduce
Steps to reproduce the behavior:
- Go to your
_data
folder - Create a file
tags.js
- Build eleventy (
eleventy
) - See error
Expected behavior
A clear and concise description of what you expected to happen.
I expected the tags.js
filename to be fine as a global data file. I didn't think there were any reserved filenames that couldn't be used so this made me curious.
Environment:
- OS and Version: [Mac OS High Sierra v10.13.6]
- Eleventy Version [v0.11.1]
Additional context
Add any other context about the problem here.