Skip to content

[eleventy-plugin-local-respimg] Posts with webmentions/images won't build #22

@brycewray

Description

@brycewray

For testing purposes as well as your evaluation of the problem I'm reporting here, I have created the following public branch:
https://github.com/brycewray/eleventy_solo/tree/plugin2
...in which the presence of every post with webmentions and their images (starting from the /src/posts/2019/12 set and going forward, as on the real site at https://brycewray.com/posts/2019/12/packing-up as an example) causes failure to build only those pages. If I delete posts with webmentions, there's no problem and all pages are built. The error message generated with this issue is:

> Having trouble writing template: _site/posts/2019/12/code-comfort-eleventy-webpack/index.html

`TemplateWriterWriteError` was thrown
> The "path" argument must be of type string. Received undefined

`TypeError` was thrown:
    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
        at validateString (internal/validators.js:121:11)
        at Object.isAbsolute (path.js:1029:5)
        at determineImagePath (/Users/thewrays/eleventy_solo/node_modules/eleventy-plugin-local-respimg/lib/helpers.js:82:13)
        at Template.respimg (/Users/thewrays/eleventy_solo/node_modules/eleventy-plugin-local-respimg/lib/respimg.js:105:34)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at async Template.runTransforms (/Users/thewrays/eleventy_solo/node_modules/@11ty/eleventy/src/Template.js:369:13)
        at async Template.renderPageEntry (/Users/thewrays/eleventy_solo/node_modules/@11ty/eleventy/src/Template.js:609:15)
        at async Template.writeMapEntry (/Users/thewrays/eleventy_solo/node_modules/@11ty/eleventy/src/Template.js:616:21)
        at async Promise.all (index 30)
        at async Eleventy.write (/Users/thewrays/eleventy_solo/node_modules/@11ty/eleventy/src/Eleventy.js:741:13)

Other notes

  • While I usually gitignore the _cache directory for the master, I am allowing it in this branch in case its webmention contents will help you.

  • I tried not using the lazy CSS class (for use of @verlok's LazyLoad code) on the Eleventy shortcode for the webmentions (/src/_includes/webmentionlist.js), just to see if there was an issue there (although it causes no problems with posts that don't have webmentions and their images); it made no difference.

  • Don't remember running into this when I tried v. 0.2.0 of this plugin for a couple of days, so am wondering if there was some breaking change with 0.2.1.

Metadata

Metadata

Assignees

No one assigned

    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