photogabble / eleventy-plugin-interlinker

Adds wikilink and wikilink embed support with tracking of backlinks.
https://photogabble.co.uk/projects/eleventyjs-interlink-plugin/
MIT License
17 stars 1 forks source link

TypeError: Cannot read properties of undefined (reading 'url') #4

Closed xplosionmind closed 10 months ago

xplosionmind commented 1 year ago

Hi! After the fix of #1 in version 1.0.1, I get another error while building. I think it is unrelated, and I cannot figure out if it is my problem or a bug in the plugin. In any case, could you help me in troubleshooting this, @photogabble?

Website repository

npm start

> tommi.space@1.0.0 start
> ELEVENTY_ENV=development eleventy --serve --watch --incremental

[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [missing-digital-tools], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [importing-workflow], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [impromptu], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [cubbit-feature-requests], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [linuxplosion-cheat-sheet], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [vim-cheat-sheet], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [pandoc-cheat-sheet], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [exiftool-cheat-sheet], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [ffmpeg-cheat-sheet], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [git-cheat-sheet], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [server-setup-nextcloud-cheat-sheet], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [la-morte-di-ivan-ilic-compartimentalizzazione], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [typography], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [colors], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [la-morte-di-ivan-ilic-il-faut-que-jeunesse-se-passe], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [quit-and-switch], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [road-to-internet-freedom], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [knowledge-management], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [vim-resources], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [javascript-resources], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [python-resources], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [bash-resources], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [latex-resources], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [openstreetmap-resources], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [git-resources], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [images-resources], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [design-resources], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [data-sources], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [reading-is-enough], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [happiness], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [apps-linuxplosion], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [thoughts-representation], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [missing], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [music-learning], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [rent-everything-is-rent], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [academic-writing-with-pandoc], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [rise-of-the-runelords], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [universal-html], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [politics-ideas], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [delete-an-account], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [relationship-with-technology], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [rent-it-was-before-i-met-you], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [personal-storage-management-notes], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [backup-checklist], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [la-morte-di-ivan-ilic-straniamento], doesn't exist.
[@photogabble/wikilinks] ERROR WikiLink Embed found pointing to non-existent [a-rainy-day-in-new-york], doesn't exist.
[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble rendering liquid template ./content/notes/public/tommi.space.md (via TemplateContentRenderError)
[11ty] 2. Cannot read properties of undefined (reading 'url'), file:./content/notes/public/tommi.space.md, line:136, col:11 (via RenderError)
[11ty] 3. Cannot read properties of undefined (reading 'url') (via TypeError)
[11ty] 
[11ty] Original error stack trace: TypeError: Cannot read properties of undefined (reading 'url')
[11ty]     at Object.inline_wikilink (/home/tommi/tommi.space/node_modules/@photogabble/eleventy-plugin-interlinker/src/markdown-ext.js:84:29)
[11ty]     at Renderer.renderInline (/home/tommi/tommi.space/node_modules/markdown-it/lib/renderer.js:275:28)
[11ty]     at Renderer.render (/home/tommi/tommi.space/node_modules/markdown-it/lib/renderer.js:330:22)
[11ty]     at MarkdownIt.renderInline (/home/tommi/tommi.space/node_modules/markdown-it/lib/index.js:578:24)
[11ty]     at Object.<anonymous> (/home/tommi/tommi.space/.eleventy.js:169:13)
[11ty]     at Object.<anonymous> (/home/tommi/tommi.space/node_modules/@11ty/eleventy/src/BenchmarkGroup.js:32:26)
[11ty]     at Object.<anonymous> (/home/tommi/tommi.space/node_modules/@11ty/eleventy/src/Engines/Liquid.js:63:17)
[11ty]     at Filter.render (/home/tommi/tommi.space/node_modules/liquidjs/dist/liquid.node.cjs.js:1984:29)
[11ty]     at render.next (<anonymous>)
[11ty]     at toPromise (/home/tommi/tommi.space/node_modules/liquidjs/dist/liquid.node.cjs.js:451:32)
[11ty] Benchmark   2765ms  60% 14779× (Configuration) "slugify" JavaScript Function
[11ty] Copied 20 files / Wrote 0 files in 4.14 seconds (v2.0.1)

Full build log

xplosionmind commented 10 months ago

Hi @carbontwelve! I was wondering if you had any chance to take a look to this, and if I can help you debug this in any way.

Thanks a lot!

carbontwelve commented 10 months ago

@xplosionmind howdy, wow I should have got this fixed a long time ago! Apollogies for the delay. I will make time over the next week or so to get this solved.

carbontwelve commented 10 months ago

I have pulled down your repository and re-installed this plugin and uncommented the lines in your 11ty config to use it. The project builds successfully (without the submodule installed) for me; it looks like in the months since you first had this issue its "fixed itself."

From the stack trace you posted I can see that it fell over trying to discover the url for./content/notes/public/tommi.space.md, which you have since moved elsewhere.

I have pulled down commit d3715fb22 and can now see the failure :)

While the plugin appears to work in the current version of your repository, I'll work out why it failed in April and add a bugfix so it doesn't do so again.


As an aside, when I install the scripts submodule for your repository and try to build the project I get the following:

[11ty] require() of ES Module /Users/simon/Code/tinkering/tommi.space/node_modules/.pnpm/title-case@4.1.2/node_modules/title-case/dist/index.js from /Users/simon/Code/tinkering/tommi.space/scripts/scripts.11tydata.js not supported.
[11ty] Instead change the require of index.js in /Users/simon/Code/tinkering/tommi.space/scripts/scripts.11tydata.js to a dynamic import() which is available in all CommonJS modules. (via Error)
xplosionmind commented 10 months ago

Thanks so much for your time and your efforts, @carbontwelve!

I am sorry my repository is a mess… in the weekend I plan to get to that and assist you in the troubleshooting.

Forget about the scripts submodule… I haven’t properly maintained it in a while…

xplosionmind commented 10 months ago

Hi! I am not having any issues of this king by running the plugin, now, so I am closing this issue.