Skip to content

[eleventy-plugin-local-respimg] '(intermediate value).flat' error #49

@jacobbf

Description

@jacobbf

Getting the following mysterious error out of eleventy-plugin-local-respimg.

> Having trouble writing template: _site/index.html

`TemplateWriterWriteError` was thrown
> (intermediate value).flat is not a function

`TypeError` was thrown:
    TypeError: (intermediate value).flat is not a function
        at Template.respimg (/Users/jake/Documents/Sites/jakebf.com/node_modules/eleventy-plugin-local-respimg/lib/respimg.js:162:112)

My responsive image config is 100% the same as the example besides changing output to _site. The images files live at /assets/images and are included in the html as <img src="/assets/images/{{ item.id }}.jpeg" alt="{{ item.title }}">. Initially I thought it might have something to do with the way I'm generating the src in Nunjucks, but I tried removing everything and calling a specific image and the error persisted, so I'm inclined to think it has something to do with the config of the site more generally.

Let me know what might be helpful! Happy to provide a public version of the repo if necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions