Skip to content

Conversation

arcxyz
Copy link

@arcxyz arcxyz commented Mar 18, 2022

I reach the following error while testing the Vue 3 version on a project that is currently working with Vue 2 templates:

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] > The "path" argument must be of type string. Received undefined

`TypeError` was thrown:
[11ty]     TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
        at new NodeError (node:internal/errors:371:5)
        at validateString (node:internal/validators:120:11)
        at Object.join (node:path:1172:7)
        at EleventyVue.findFiles ([...]/node_modules/@11ty/eleventy-plugin-vue/EleventyVue.js:246:35)
        at Object.init ([...]/node_modules/@11ty/eleventy-plugin-vue/.eleventy.js:135:39)
        at CustomEngine._runningInit ([...]/node_modules/@11ty/eleventy/src/Engines/Custom.js:57:11)
        at CustomEngine.getExtraDataFromFile ([...]/node_modules/@11ty/eleventy/src/Engines/Custom.js:74:16)
        at Template.getFrontMatterData ([...]/node_modules/@11ty/eleventy/src/TemplateContent.js:209:39)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at async Template.getData ([...]/node_modules/@11ty/eleventy/src/Template.js:404:29)
[11ty] Wrote 0 files in 0.01 seconds (v1.0.0)

The findFiles method is trying to read some undefined properties:

https://github.com/11ty/eleventy-plugin-vue/blob/master/EleventyVue.js#L246
https://github.com/11ty/eleventy-plugin-vue/blob/master/EleventyVue.js#L254

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

Successfully merging this pull request may close these issues.

1 participant