Repository navigation
Description
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)

Activity
samwightt commentedon May 28, 2024
Having this same problem.
vogloblinsky commentedon May 28, 2024
Do you have the code where Compodoc breaks ?
pirelaurent commentedon Jun 30, 2024
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
fix(router): handle TypeScript expressions in route definitions