Typedoc: Cannot read property 'files' of undefined.

Created on 3 Mar 2017  路  4Comments  路  Source: TypeStrong/typedoc

I have a medium sized project failing to run typedoc in latest version (0.5.7)

Using TypeScript 2.1.6 from /home/shadowmanu/Desktop/stable/zoi-client/node_modules/typedoc/node_modules/typescript/lib
/home/shadowmanu/Desktop/stable/zoi-client/node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js:118
            directory.files.push(file);
                     ^

TypeError: Cannot read property 'files' of undefined
    at /home/shadowmanu/Desktop/stable/zoi-client/node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js:118:22
    at Array.forEach (native)
    at SourcePlugin.onEndResolve (/home/shadowmanu/Desktop/stable/zoi-client/node_modules/typedoc/dist/lib/converter/plugins/SourcePlugin.js:103:23)
    at triggerEvents (/home/shadowmanu/Desktop/stable/zoi-client/node_modules/typedoc/dist/lib/utils/events.js:121:43)
    at triggerApi (/home/shadowmanu/Desktop/stable/zoi-client/node_modules/typedoc/dist/lib/utils/events.js:106:13)
    at eventsApi (/home/shadowmanu/Desktop/stable/zoi-client/node_modules/typedoc/dist/lib/utils/events.js:20:18)
    at Converter.EventDispatcher.trigger (/home/shadowmanu/Desktop/stable/zoi-client/node_modules/typedoc/dist/lib/utils/events.js:261:13)
    at Converter.resolve (/home/shadowmanu/Desktop/stable/zoi-client/node_modules/typedoc/dist/lib/converter/converter.js:172:14)
    at Converter.convert (/home/shadowmanu/Desktop/stable/zoi-client/node_modules/typedoc/dist/lib/converter/converter.js:104:28)
    at CliApplication.Application.convert (/home/shadowmanu/Desktop/stable/zoi-client/node_modules/typedoc/dist/lib/application.js:72:37)

Most helpful comment

A little debugging, seems to be a name conflict. I have a folder called files (with a file inside callled files.control.ts), files conflicting with SourceDirectory#files.

All 4 comments

A little debugging, seems to be a name conflict. I have a folder called files (with a file inside callled files.control.ts), files conflicting with SourceDirectory#files.

A miracle you just posted this... I had the exact same problem just now!

I have the same issue, did anyone find a workaround, beside the option to rename the folder ?

@khorvat the best workaround should be a PR on it.

Was this page helpful?
0 / 5 - 0 ratings