better-docs
better-docs copied to clipboard
"Cannot read property 'filePath' of undefined" error for Vue files
I'm trying to use better-docs for Vue files, but I always get the following: TypeError: Cannot read property 'filePath' of undefined
. Here is a copy of my jsdoc.json:
{
"source": {
"include": [
"src",
"dev"
],
"includePattern": ".+\\.(js|vue)(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"sourceType": "module",
"opts": {
"destination": "jsdoc_html",
"recurse": true,
"private": true,
"readme": "./doc.md",
"template": "node_modules/better-docs"
},
"tags": {
"allowUnknownTags": [
"component"
]
},
"plugins": [
"node_modules/better-docs/component"
]
}
Restoring the include pattern to ".+\\.js(doc|x)?$"
does not give any errors.
Thanks in advance,
can you paste the component which causes the error (maybe it is related to the issue where better-docs doesn't support module aliases like import '@src/my-file.vue'
)
I've already switched back to JSDoc because I couldn't produce any results with better-docs. As for the cause, you're probably right because most of my Vue components have '@'-like imports.