Open dvonessen opened 1 year ago
One thing to note this only seems to be when generating api documentation for other languages other than typescript.
@gcix/gcix.addons
needs to be a jsii library as well or it's identified wrongly as needing to be one.
I've also run into this, but with java.
The command:
npx jsii-docgen -f json -l java
in my publicly available jsii project @contract-case/case-definition-dsl
, produces the following error:
Error: unable to determine assembly since module does not have any types: @contract-case/case-definition-dsl.mocks
at JavaTranspile.getParentModule (/Users/home/office/contract-case/contract-case/node_modules/jsii-docgen/lib/docgen/transpile/transpile.js:394:19)
at JavaTranspile.moduleLike (/Users/home/office/contract-case/contract-case/node_modules/jsii-docgen/lib/docgen/transpile/java.js:78:33)
at JavaTranspile.type (/Users/home/office/contract-case/contract-case/node_modules/jsii-docgen/lib/docgen/transpile/java.js:96:33)
@contract-case/case-definition-dsl.mocks
is a submodule of my jsii project. It only re-exports other types though - perhaps that's the problem?
in my publicly available jsii project
@contract-case/case-definition-dsl
, produces the following error:
This seems to be because the submodule @contract-case/case-definition-dsl.mocks
doesn't define any types on it's own. It's just a wrapper around some other submodules. Definitely a bug.
I am facing the same issue. jsii-docgen fails when creating python documentation because one of my index.ts files only exports submodules, and doesn't have any types. I tried manually adding a type, but have not been successful so far.
jsii-docgen --split-by-submodule -l python -o ./docs/API_documentation/Python/API.md
Error: unable to determine assembly since module does not have any types: @library/custom-cdk-constructs.cloud_products
at PythonTranspile.getParentModule (/usr/local/lib/node_modules/jsii-docgen/lib/docgen/transpile/transpile.js:394:19)
at PythonTranspile.moduleLike (/usr/local/lib/node_modules/jsii-docgen/lib/docgen/transpile/python.js:244:35)
at PythonTranspile.type (/usr/local/lib/node_modules/jsii-docgen/lib/docgen/transpile/python.js:223:33)
at PythonTranspile.callable (/usr/local/lib/node_modules/jsii-docgen/lib/docgen/transpile/python.js:185:27)
at new Initializer (/usr/local/lib/node_modules/jsii-docgen/lib/docgen/view/initializer.js:9:37)
at new Class (/usr/local/lib/node_modules/jsii-docgen/lib/docgen/view/class.js:24:32)
at new Construct (/usr/local/lib/node_modules/jsii-docgen/lib/docgen/view/construct.js:7:26)
at /usr/local/lib/node_modules/jsii-docgen/lib/docgen/view/constructs.js:10:25
at Array.map (<anonymous>)
at new Constructs (/usr/local/lib/node_modules/jsii-docgen/lib/docgen/view/constructs.js:10:14)
I was able to generate java documentation with the following workaround type (note that you'll need to run jsii
again before jsii-docgen
, or it won't know you've changed anything)
/**
* Empty class to make jsii-docgen happy with this module
*/
export class Empty {}
Unfortunately, if I annotate it @internal
so that the documentation isn't generated, the error comes back - so it's not a great workaround.
Hi, I have a problem with generating API documentation with jsii-docgen for the python library. Given module layout:
The following problem happens as soon as I add a named export on the second level of the library.
Error message:
The repo can be found at https://gitlab.com/gcix/gcix.