I have a file say test.ts that contain some functions. When I try to generate documentation Iam getting the error as
UnhandledPromiseRejectionWarning:Unhandled promise rejection(rejection id:1): RangeError:Invalid array length .
I have 3 functions in test.ts. If either I commented out a particular function (out of 3) say get() or if I commented out functions other than get() , compodoc works fine.
Node.js:v6.9.0
compodoc:0.0.39
compodoc is installed locally and included as a dev dependency.
Any Idea why this is happening?
Is it possible to have the code of the blocking function ?
But I don't understand how that function works when i comment out remaining functions in that file.
I think it is the rest parameter that breaks the things.
But I do have other files having functions with rest parameters.
If rest parameter breaks things, then how does this function work when i comment out the remaining functions in the file.
I have checked by removing the rest parameter , still it fails
Strange it doesn't break on the demo project (https://github.com/compodoc/compodoc-demo-todomvc-angular) copying-pasting your code in https://github.com/compodoc/compodoc-demo-todomvc-angular/blob/master/src/app/shared/miscellaneous/miscellaneous.ts
Using compodoc locally.
Yeah It is ineed strange that this particular function works well when other functions in file are commented.
Is there any way to identify which promise has thrown this error? Any piece of debugging info?
Can you try the last version 0.0.40 ?
I fixed a bug with TypeScript v2.2.0
No I tried but same error
I'm seeing this as well, the stack trace is (super busy atm so don't have the time to send a PR to debug further):
RangeError: Invalid array length
at pad (/Users/mattlewis/Code/open-source/angular-calendar/node_modules/compodoc/src/logger.ts:49:15)
at Logger.format (/Users/mattlewis/Code/open-source/angular-calendar/node_modules/compodoc/src/logger.ts:54:14)
at Logger.error (/Users/mattlewis/Code/open-source/angular-calendar/node_modules/compodoc/src/logger.ts:35:15)
at /Users/mattlewis/Code/open-source/angular-calendar/node_modules/compodoc/src/app/compiler/dependencies.ts:137:32
at Array.map (native)
at Dependencies.getDependencies (/Users/mattlewis/Code/open-source/angular-calendar/node_modules/compodoc/src/app/compiler/dependencies.ts:124:21)
at CliApplication.Application.getDependenciesData (/Users/mattlewis/Code/open-source/angular-calendar/node_modules/compodoc/src/app/application.ts:123:40)
at /Users/mattlewis/Code/open-source/angular-calendar/node_modules/compodoc/src/app/application.ts:102:18
If you need a project to test it on: https://github.com/mattlewis92/angular-calendar (yarn && yarn run compodoc)
Fixed in 0.0.41
For angular-calendar it is working fine now. i hope for @dharsanav too
Thanks. Now it's working fine.It would be better if u could address #101 in further release.
Works great for me as well, thanks for the quick turnaround @vogloblinsky 馃憤
Ah getting the same error (and stacktrace) on a different project now: https://github.com/mattlewis92/angular-resizable-element
Steps to reproduce:
yarn
yarn add --dev [email protected]
// remove this bit from package.json: -b /angular-resizable-element/docs/
yarn run compodoc
Ok, related to return type TypeScript analysis for one function of the directive.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.