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

Cannot read properties of undefined (reading inputPath) (via TypeError) #1

Closed
xplosionmind opened this issue Mar 18, 2023 · 4 comments

Comments

@xplosionmind
Copy link

My website’s build fails when adding this plugin:

> [email protected] start
> ELEVENTY_ENV=development eleventy --serve --watch --incremental

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] Cannot read properties of undefined (reading 'inputPath') (via TypeError)
[11ty] 
[11ty] Original error stack trace: TypeError: Cannot read properties of undefined (reading 'inputPath')
[11ty]     at compileTemplate (/Users/tommi/tommi.space/node_modules/@photogabble/eleventy-plugin-interlinker/index.js:31:33)
[11ty]     at /Users/tommi/tommi.space/node_modules/@photogabble/eleventy-plugin-interlinker/index.js:147:51
[11ty]     at Array.forEach (<anonymous>)
[11ty]     at /Users/tommi/tommi.space/node_modules/@photogabble/eleventy-plugin-interlinker/index.js:147:14
[11ty]     at Array.forEach (<anonymous>)
[11ty]     at Object.backlinks (/Users/tommi/tommi.space/node_modules/@photogabble/eleventy-plugin-interlinker/index.js:127:16)
[11ty]     at ComputedData._setupDataEntry (/Users/tommi/tommi.space/node_modules/@11ty/eleventy/src/ComputedData.js:98:25)
[11ty]     at ComputedData.processRemainingData (/Users/tommi/tommi.space/node_modules/@11ty/eleventy/src/ComputedData.js:119:16)
[11ty]     at Template.resolveRemainingComputedData (/Users/tommi/tommi.space/node_modules/@11ty/eleventy/src/Template.js:625:31)
[11ty]     at TemplateMap.resolveRemainingComputedData (/Users/tommi/tommi.space/node_modules/@11ty/eleventy/src/TemplateMap.js:731:39)
[11ty] Benchmark   4497ms  50% 14436× (Configuration) "slugify" JavaScript Function
[11ty] Copied 30 files / Wrote 0 files in 6.41 seconds (v2.0.0)

Full DEBUG log

@xplosionmind
Copy link
Author

P.S.: I would like to thank you from the bottom of my heart for conceiving this plugin. I love it.

@carbontwelve
Copy link
Contributor

Ah, I have just come across this myself on my website:

[11ty] Cannot read properties of undefined (reading 'inputPath') (via TypeError)
[11ty] 
[11ty] Original error stack trace: TypeError: Cannot read properties of undefined (reading 'inputPath')
[11ty]     at compileTemplate (/Users/simon/Code/photogabble/website/node_modules/@photogabble/eleventy-plugin-interlinker/index.js:31:33)
[11ty]     at /Users/simon/Code/photogabble/website/node_modules/@photogabble/eleventy-plugin-interlinker/index.js:147:51
[11ty]     at Array.forEach (<anonymous>)
[11ty]     at /Users/simon/Code/photogabble/website/node_modules/@photogabble/eleventy-plugin-interlinker/index.js:147:14
[11ty]     at Array.forEach (<anonymous>)
[11ty]     at Object.backlinks (/Users/simon/Code/photogabble/website/node_modules/@photogabble/eleventy-plugin-interlinker/index.js:127:16)
[11ty]     at ComputedData._setupDataEntry (/Users/simon/Code/photogabble/website/node_modules/@11ty/eleventy/src/ComputedData.js:90:25)
[11ty]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[11ty]     at async ComputedData.processRemainingData (/Users/simon/Code/photogabble/website/node_modules/@11ty/eleventy/src/ComputedData.js:111:5)
[11ty]     at async Template.resolveRemainingComputedData (/Users/simon/Code/photogabble/website/node_modules/@11ty/eleventy/src/Template.js:625:7)

Will be working on a fix today. Appologies for the late reply, it seems Github notifications aren't getting through to my email.

@xplosionmind
Copy link
Author

No worries @carbontwelve, thanks so much! Will check soon.

@carbontwelve
Copy link
Contributor

@xplosionmind this should now be fixed in v1.0.1 by #3. Please reopen this issue if that doesn't fix the problem for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants