Skip to content

Angular v16. while generating the Doc #1484

Closed

Description

@Abhishek1014

Unhandled Rejection at: Promise {
SyntaxError: JSON5: invalid character '(' at 1:457
at syntaxError (D:\geolah-admin\node_modules\json5\lib\parse.js:1110:17)
at invalidChar (D:\geolah-admin\node_modules\json5\lib\parse.js:1055:12)
at Object.value (D:\geolah-admin\node_modules\json5\lib\parse.js:309:15)
at lex (D:\geolah-admin\node_modules\json5\lib\parse.js:100:42)
at Object.parse (D:\geolah-admin\node_modules\json5\lib\parse.js:25:17)
at loopInsideModule (D:\geolah-admin\node_modules@compodoc\compodoc\dist\index-cli-a4b7f403.js:6208:63)
at loopRoutesParser (D:\geolah-admin\node_modules@compodoc\compodoc\dist\index-cli-a4b7f403.js:6241:29)
at loopRoutesParser (D:\geolah-admin\node_modules@compodoc\compodoc\dist\index-cli-a4b7f403.js:6246:21)
at loopRoutesParser (D:\geolah-admin\node_modules@compodoc\compodoc\dist\index-cli-a4b7f403.js:6246:21)
at loopRoutesParser (D:\geolah-admin\node_modules@compodoc\compodoc\dist\index-cli-a4b7f403.js:6246:21) {
lineNumber: 1,
columnNumber: 457
}
} reason: SyntaxError: JSON5: invalid character '(' at 1:457
at syntaxError (D:\geolah-admin\node_modules\json5\lib\parse.js:1110:17)
at invalidChar (D:\geolah-admin\node_modules\json5\lib\parse.js:1055:12)
at Object.value (D:\geolah-admin\node_modules\json5\lib\parse.js:309:15)
at lex (D:\geolah-admin\node_modules\json5\lib\parse.js:100:42)
at Object.parse (D:\geolah-admin\node_modules\json5\lib\parse.js:25:17)
at loopInsideModule (D:\geolah-admin\node_modules@compodoc\compodoc\dist\index-cli-a4b7f403.js:6208:63)
at loopRoutesParser (D:\geolah-admin\node_modules@compodoc\compodoc\dist\index-cli-a4b7f403.js:6241:29)
at loopRoutesParser (D:\geolah-admin\node_modules@compodoc\compodoc\dist\index-cli-a4b7f403.js:6246:21)
at loopRoutesParser (D:\geolah-admin\node_modules@compodoc\compodoc\dist\index-cli-a4b7f403.js:6246:21)
at loopRoutesParser (D:\geolah-admin\node_modules@compodoc\compodoc\dist\index-cli-a4b7f403.js:6246:21) {
lineNumber: 1,
columnNumber: 457
}
[10:20:27] Sorry, but there was a problem during parsing or generation of the documentation. Please fill an issue on github. (https://github.com/compodoc/compodoc/issues/new)
Command failed: D:\geolah-admin\node_modules.bin\compodoc.CMD -p,tsconfig.json
and
"@compodoc/compodoc": "^1.1.24" (The latest one)
Screenshot_1

Activity

  1. samwightt commented on May 28, 2024

    @samwightt

    Having this same problem.

  2. vogloblinsky commented on May 28, 2024

    @vogloblinsky
    Contributor

    Do you have the code where Compodoc breaks ?

  3. pirelaurent commented on Jun 30, 2024

    @pirelaurent

    I got the same problem with a fresh install of compodoc with the same kind of error:
    } reason: SyntaxError: JSON5: invalid character '(' at 1:825`

    I put a console.log(source) into parse.js line 15 to get the line.
    ( located at .nvm\versions\node\v19.9.0\lib\node_modules@compodoc\compodoc\node_modules\json5\lib)

    The implied source variable is a one sentence json without any separator.
    825th char is a parenthesis ( .
    Once the json line reformatted, can see that the error comes from parenthesis of the anonymous function at desc : (
    data: { name: ComponentConstants.STOCK_TYPE_FORM, desc: ({ data }: { data: TheStockTypeDTO }) => data.stockTypeCode }

    It seems that these functions are not taken in account by compodoc here.

    (I have read that a correct code will be to use a resolver name in place of the function, but i have not try further yet. If other ideas please share .)

    HTH

  4. added a commit that references this issue on May 24, 2026
    1af3029
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions