question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue
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 (https://github.com/compodoc/compodoc/issues/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 }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
vogloblinskycommented, Apr 16, 2018

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

1reaction
alan-agius4commented, Apr 20, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest tests failed after upgrading axios to v1.1.2 · Issue #5101
Problem with Jest is that it runs code in Node, but application is built for web-clients. This is why telling Jest to transform...
Read more >
131 - Stack Overflow
I was receiving Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/parser' is not defined by "exports ...
Read more >
Bug listing with status RESOLVED with resolution FIXED as at ...
Bug :2 - "How do I attach an ebuild. ... status:RESOLVED resolution:FIXED severity:major · Bug:656 - "Environment variable not set when calling emerge...
Read more >
Underscore.js
Underscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects.
Read more >
jQuery API Documentation
Create a new jQuery object with elements added to the set of matched elements. ... Register a handler to be called when Ajax...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found