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

[BUG] "comment" not defined in [object Object] using v1.1.2 #543

Closed
peterbakonyi05 opened this issue Apr 16, 2018 · 7 comments
Closed

[BUG] "comment" not defined in [object Object] using v1.1.2 #543

peterbakonyi05 opened this issue Apr 16, 2018 · 7 comments

Comments

@peterbakonyi05
Copy link

peterbakonyi05 commented Apr 16, 2018

Overview of the issue

Generating doc fails using v1.2.0

Operating System, Node.js, npm, compodoc version(s)

Compodoc 1.1.2

Typescript version : 2.8.1

Node.js version : v8.9.0

Operating system : Windows 10

Angular configuration, a package.json file in the root folder

We use ng-packagr

package.json:

"devDependencies": {
		"@angular/animations": "^5.2.0",
		"@angular/common": "^5.2.0",
		"@angular/compiler": "^5.2.0",
		"@angular/compiler-cli": "^5.2.0",
		"@angular/core": "^5.2.0",
		"@angular/forms": "^5.2.0",
		"@angular/language-service": "^5.2.0",
		"@angular/platform-browser": "^5.2.0",
		"@angular/platform-browser-dynamic": "^5.2.0",
		"@angular/router": "^5.2.0",
		"@compodoc/compodoc": "^1.1.2",
		"@ngrx/effects": "^5.1.0",
		"@ngrx/store": "^5.1.0",
		"@obg/tools.core": "^2.2.2",
		"@types/chokidar": "^1.7.5",
		"@types/jest": "^22.1.2",
		"@types/lodash": "^4.14.87",
		"@types/node": "^9.3.0",
		"chokidar": "^2.0.2",
		"conventional-changelog-angular-bitbucket": "^1.1.2",
		"date-fns": "^1.29.0",
		"jest": "^22.1.1",
		"jest-jquery-matchers": "^2.0.1",
		"jest-localstorage-mock": "^2.1.0",
		"jest-preset-angular": "^5.0.0",
		"jquery": "^3.3.1",
		"lerna": "2.9.0",
		"lodash": "^4.17.4",
		"ng-packagr": "^2.4.0",
		"pre-commit": "^1.2.2",
		"rxjs": "^5.5.5",
		"scss-bundle": "^2.1.2",
		"tslib": "^1.7.0",
		"typescript": "~2.7.2",
		"zone.js": "^0.8.16"
	}
Compodoc installed globally or locally ?

Locally

Motivation for or Use Case

To be able to generate the docs with 1.1.2

Reproduce the error

Update from 1.0.9 to 1.1.2

Related issues

It seems related to the handlebar issue on 1.1.1 (#521) since I had the heap out of memory issue using 1.1.1 and based on the stack trace this is also coming from handlebars

Suggest a Fix

Stack trace:

Unhandled Rejection at: Promise {
  <rejected> { Error: "comment" not defined in [object Object]
    at Object.strict (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\handlebars\runtime.js:9
6:15)
    at eval (eval at createFunctionContext (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\h
andlebars\compiler\javascript-compiler.js:254:23), <anonymous>:6:59)
    at prog (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\handlebars\runtime.js:221:12)
    at execIteration (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\handlebars\helpers\each
.js:51:19)
    at Object.<anonymous> (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\handlebars\helpers
\each.js:61:13)
    at eval (eval at createFunctionContext (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\h
andlebars\compiler\javascript-compiler.js:254:23), <anonymous>:6:31)
    at Object.prog [as fn] (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\handlebars\runtim
e.js:221:12)
    at JsdocCodeExampleHelper.helperFunc (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\dist\index-cli.js:2180:28)
    at Object.<anonymous> (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\dist\index-cli.js:2752:38)
    at eval (eval at createFunctionContext (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\h
andlebars\compiler\javascript-compiler.js:254:23), <anonymous>:7:90)
  description: undefined,
  fileName: undefined,
  lineNumber: undefined,
  message: '"comment" not defined in [object Object]',
  name: 'Error',
  number: undefined } } reason: { Error: "comment" not defined in [object Object]
    at Object.strict (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\handlebars\runtime.js:9
6:15)
    at eval (eval at createFunctionContext (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\h
andlebars\compiler\javascript-compiler.js:254:23), <anonymous>:6:59)
    at prog (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\handlebars\runtime.js:221:12)
    at execIteration (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\handlebars\helpers\each
.js:51:19)
    at Object.<anonymous> (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\handlebars\helpers
\each.js:61:13)
    at eval (eval at createFunctionContext (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\h
andlebars\compiler\javascript-compiler.js:254:23), <anonymous>:6:31)
    at Object.prog [as fn] (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\handlebars\runtim
e.js:221:12)
    at JsdocCodeExampleHelper.helperFunc (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\dist\index-cli.js:2180:28)
    at Object.<anonymous> (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\dist\index-cli.js:2752:38)
    at eval (eval at createFunctionContext (C:\git\obg.ngx.packages\node_modules\@compodoc\compodoc\node_modules\handlebars\dist\cjs\h
andlebars\compiler\javascript-compiler.js:254:23), <anonymous>:7:90)
  description: undefined,
  fileName: undefined,
  lineNumber: undefined,
  message: '"comment" not defined in [object Object]',
  name: 'Error',
  number: undefined }
@vogloblinsky
Copy link
Contributor

I have activated the strict mode for handlebars.
The bug seems related to JsdocCodeExampleHelper helper.
I will have a look today.

@jensschneider
Copy link

I have got the same problem since my update to version 1.1.2.

@vogloblinsky
Copy link
Contributor

@jensschneider do you have an example of code/file where it breaks ? thanks

@jensschneider
Copy link

I'm sorry, but it's about internal code that can not be shared.
Do we have another way to find the problem?

@alan-agius4
Copy link
Contributor

Same problem here, and I cannot share my codebase ss it’s private and huge just to replicate a small reproduction

@nikhilknoldus
Copy link

nikhilknoldus commented Feb 14, 2019

@alan-agius4, @peterbakonyi05 @vogloblinsky did you find the solution for this?

@lock
Copy link

lock bot commented Sep 30, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants