Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
brycewray opened this issue May 23, 2020 · 0 comments

Comments

@brycewray
Copy link

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.

@brycewray brycewray changed the title Posts with webmentions/images won't build [eleventy-plugin-local-respimg] Posts with webmentions/images won't build May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants