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] Unhandled Rejection at: Promise { SyntaxError: JSON5: invalid character '(' at 1:94

See original GitHub issue

I’m trying to run compodoc on my Angular 9 project and it keep throwing an error

Angular: 9.0.2 NPM: 12.14.0 Compodoc: 1.11.1 Typescript: 3.7.5

Im running npx compodoc -p tsconfig.json. Here’s the error:

Unhandled Rejection at: Promise {
  <rejected> SyntaxError: JSON5: invalid character '(' at 1:94
      at syntaxError (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/node_modules/json5/lib/parse.js:1083:17)
      at invalidChar (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/node_modules/json5/lib/parse.js:1028:12)
      at Object.value (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/node_modules/json5/lib/parse.js:287:15)
      at lex (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/node_modules/json5/lib/parse.js:78:42)
      at Object.parse (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/node_modules/json5/lib/parse.js:25:17)
      at loopInsideModule (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5370:52)
      at loopRoutesParser (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5403:29)
      at loopRoutesParser (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5408:21)
      at loopRoutesParser (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5408:21)
      at loopRoutesParser (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5408:21) {
    lineNumber: 1,
    columnNumber: 94
  }
} reason: SyntaxError: JSON5: invalid character '(' at 1:94
    at syntaxError (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/node_modules/json5/lib/parse.js:1083:17)
    at invalidChar (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/node_modules/json5/lib/parse.js:1028:12)
    at Object.value (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/node_modules/json5/lib/parse.js:287:15)
    at lex (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/node_modules/json5/lib/parse.js:78:42)
    at Object.parse (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/node_modules/json5/lib/parse.js:25:17)
    at loopInsideModule (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5370:52)
    at loopRoutesParser (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5403:29)
    at loopRoutesParser (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5408:21)
    at loopRoutesParser (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5408:21)
    at loopRoutesParser (/Users/javier/Documents/dev/jaque/plato-puesto/node_modules/@compodoc/compodoc/dist/application-54cd2170.js:5408:21) {
  lineNumber: 1,
  columnNumber: 94
}```

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
BrsJskcommented, Aug 18, 2020

If you add --disableDependencies --minimal arguments, it should pass.

0reactions
paolagodoycommented, Jul 28, 2022

Same issue here Unhandled Rejection at: Promise { <rejected> SyntaxError: JSON5: invalid character ‘(’ at 1:1 at syntaxError (/node_modules/json5/lib/parse.js:1083:17) at invalidChar (/node_modules/json5/lib/parse.js:1028:12) at Object.value (/node_modules/json5/lib/parse.js:287:15)

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Parcel: JSON5: invalid character '\' - Stack Overflow
On trying to build a react app using tailwind and postcss, it throws me this error. /mnt/c/Users/Shaleen/Documents/Visual Studio ...
Read more >
[BUG] SyntaxError: JSON5: invalid character ',' - Bountysource
[BUG] SyntaxError: JSON5: invalid character ','
Read more >
Error at NPM start - The Atlassian Developer Community
I get error at npm start with the template ACE repo. ... SyntaxError: JSON5: invalid character '​' at 46:1 const util = require('....
Read more >
I'm getting this error and can't seem to google my way ... - Reddit
Please run next command `yarn upgrade` SyntaxError: JSON5: invalid end of input at 1:1 at syntaxError (/mnt/d/Coding/projects/nextjs-blog/ ...
Read more >
Open Source Used In V2PC 3.3.3 - Cisco
Error handling. This is a problem every promise library needs to handle in some way. Unhandled rejections/exceptions don't really.
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