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

Failure to load module with error for umlClassDiagramBoxBorderWidth value #15

Closed
cckoble opened this issue May 26, 2020 · 8 comments
Closed
Labels
question Further information is requested

Comments

@cckoble
Copy link

cckoble commented May 26, 2020

When I attempt to run typedoc I get an error for a value being invalid.

Full stack is:

Error: The plugin /Project/node_modules/typedoc-umlclass could not be loaded.

Error: umlClassDiagramBoxBorderWidth must be >= 0
    at Object.convert (/usr/lib/node_modules/typedoc/dist/lib/utils/options/declaration.js:37:23)
    at Options.setOptionValueToDefault (/usr/lib/node_modules/typedoc/dist/lib/utils/options/options.js:119:64)
    at Options.addDeclaration (/usr/lib/node_modules/typedoc/dist/lib/utils/options/options.js:53:14)
    at PluginOptions.addToApplication (/Project/node_modules/typedoc-umlclass/dist/plugin_options.js:287:25)
    at Plugin.addOptionsToApplication (/Project/node_modules/typedoc-umlclass/dist/plugin.js:51:22)
    at Plugin.initialize (/Project/node_modules/typedoc-umlclass/dist/plugin.js:43:14)
    at load (/Project/node_modules/typedoc-umlclass/dist/index.js:9:27)
    at PluginHost.load (/usr/lib/node_modules/typedoc/dist/lib/utils/plugins.js:28:21)
    at CliApplication.bootstrap (/usr/lib/node_modules/typedoc/dist/lib/application.js:50:22)
    at CliApplication.bootstrap (/usr/lib/node_modules/typedoc/dist/lib/cli.js:29:30)
/usr/lib/node_modules/typedoc/dist/lib/utils/options/declaration.js:37
                throw new Error(getBoundsError(numberOption.name, numberOption.minValue, numberOption.maxValue));
                ^

Error: umlClassDiagramBoxBorderWidth must be >= 0
    at Object.convert (/usr/lib/node_modules/typedoc/dist/lib/utils/options/declaration.js:37:23)
    at Options.setOptionValueToDefault (/usr/lib/node_modules/typedoc/dist/lib/utils/options/options.js:119:64)
    at Options.reset (/usr/lib/node_modules/typedoc/dist/lib/utils/options/options.js:24:18)
    at CliApplication.bootstrap (/usr/lib/node_modules/typedoc/dist/lib/application.js:51:22)
    at CliApplication.bootstrap (/usr/lib/node_modules/typedoc/dist/lib/cli.js:29:30)
    at Object.<anonymous> (/usr/lib/node_modules/typedoc/bin/typedoc:5:5)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

I am using typedoc with no other extensions.
I installed using the command "npm install typedoc-umlclass --save-dev"
I have tried adding a value to my typedoc.json for the umlClassDiagramBoxBorderWidth option with values of -1, 0, and 1; all failed.

@krisztianb
Copy link
Owner

krisztianb commented May 26, 2020

What version of typedoc and this plugin are you using?

This seems to be the same issue as this one: #6 (comment)

Could you try the suggested solution?

@cckoble
Copy link
Author

cckoble commented May 26, 2020

My apologies, I missed that bug. I was one version behind on typedoc, the update fixed it. Now to figure out why I'm not getting any diagrams. I see its loading the plugin. Find for .svg files is showing none in the output. Is there any sort of debugging or verbose logging I can enable?

@krisztianb
Copy link
Owner

krisztianb commented May 26, 2020

No, there is no verbose output or logging.

Are the usual typedoc HTML files generated? Class diagrams are only created if the class or interface has inheritance/implementation involved. Could that be the problem?

If not, you will have give me as many details as you can to narrow down the source of the problem.

@cckoble
Copy link
Author

cckoble commented May 26, 2020

Yes, there is quite a bit of inheritance going on. The Hierarchy has multiple tiers to it in the documentation. The normal typedoc HTML files are all there. I even deleted my generated docs directory to ensure its actually running.

My config mode is "file" and not the default "modules". I don't know if this could have any effect?

@krisztianb
Copy link
Owner

Mode "file" is fine.

I guess that not even the additional section that contains the diagram is added to the HTML?
What plugin options are you using, if any?
Could you try to use "remote" as output location? That way we could at least filter out the case of a JAVA, PlantUML generator error.

@krisztianb krisztianb added the question Further information is requested label May 26, 2020
@cckoble
Copy link
Author

cckoble commented May 26, 2020

Correct that the section is not in the html, no options for the plugin.
I added the option for umlClassDiagramLocation and set to remote, it had no effect.
Just to try a few things I set options for umlClassDiagramSectionTitle, umlClassDiagramPosition, and umlClassDiagramType. No effect in that I still have no diagrams - also checked the html and still no section where I'd expect the diagram either (above or below the Hierarchy)

@cckoble
Copy link
Author

cckoble commented May 26, 2020

I'm not even sure what I ended up doing but its generating now! Thanks for the help and the awesome tool

@cckoble cckoble closed this as completed May 26, 2020
@krisztianb
Copy link
Owner

Thanks for reporting back. I might add a verbose output option to help debug such problems.

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

No branches or pull requests

2 participants