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] 'Expected \'}\' instead of \'.\' at line 1 column 1015 of the JSON5 data. Still to read: ".\\"CREATE\\",\\"resourceT"'

See original GitHub issue
Overview of the issue

Trying to run compodoc over my existing application produces the following error. the stacktrace doesn’t yield a lot of info:

[15:50:15] parsing        : C:/extras/code/gitlab/project-name/src/app/common/feature/feature-input/feature-input.component.ts
[15:50:15] found          : FeatureInputComponent
Unhandled Rejection at: Promise {
  <rejected> { SyntaxError: Expected '}' instead of '.' at line 1 column 1015 of the JSON5 data. Still to read: ".\"CREATE\",\"resourceT"
    at error (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:56:25)
    at next (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:72:17)
    at object (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:464:25)
    at value (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:482:20)
    at array (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:417:36)
    at value (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:484:20)
    at object (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:459:35)
    at value (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:482:20)
    at array (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:417:36)
    at value (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:484:20)
  message: 'Expected \'}\' instead of \'.\' at line 1 column 1015 of the JSON5 data. Still to read: ".\\"CREATE\\",\\"resourceT"',
  at: 1014,
  lineNumber: 1,
  columnNumber: 1015 } } reason: { SyntaxError: Expected '}' instead of '.' at line 1 column 1015 of the JSON5 data. Still to read: ".\"CREATE\",\"resourceT"
    at error (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:56:25)
    at next (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:72:17)
    at object (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:464:25)
    at value (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:482:20)
    at array (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:417:36)
    at value (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:484:20)
    at object (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:459:35)
    at value (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:482:20)
    at array (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:417:36)
    at value (C:\extras\code\gitlab\projectx\authoring-ui\node_modules\json5\lib\json5.js:484:20)
  message: 'Expected \'}\' instead of \'.\' at line 1 column 1015 of the JSON5 data. Still to read: ".\\"CREATE\\",\\"resourceT"',
  at: 1014,
  lineNumber: 1,
  columnNumber: 1015 }

I’ve tried removing all the code in feature-input.component.ts and it yields the same error so I don’t think that’s where the problem is

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

Windows 7, node 6.11.1, npm 3.10.10, ng-cli 1.2.6, compodoc 1.0.3

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

not exactly sure what you’re looking for here but these are the versions we’re using

@angular/cli: 1.2.6
node: 6.11.1
os: win32 x64
@angular/animations: 4.4.3
@angular/cdk: 2.0.0-beta.11
@angular/common: 4.4.3
@angular/compiler: 4.4.3
@angular/core: 4.4.3
@angular/forms: 4.4.3
@angular/http: 4.4.3
@angular/material: 2.0.0-beta.11
@angular/platform-browser: 4.4.3
@angular/platform-browser-dynamic: 4.4.3
@angular/router: 4.4.3
@angular/cli: 1.2.6
@angular/compiler-cli: 4.4.3
Compodoc installed globally or locally ?

locally

Motivation for or Use Case

Reproduce the error

not able to figure this out yet…

Related issues
Suggest a Fix

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
vogloblinskycommented, Nov 20, 2017

Yes @disophisis it is in my todolist. It is the GenericRight.Right which breaks the stuff. I had to scan data informations for each routes, and found if there is a dynamic variable like this, and replace it during TypeScript AST parsing. Keep in touch with this issue.

1reaction
vogloblinskycommented, Nov 16, 2017

Yes @GermainMoreau, thanks for your feedback. ApplicationConst.uploadPath is a dynamic import string, i have to handle that for routes. The stuff was done for components/directives metadatas, it will not take so much time. I will work on that today and tomorrow. Stay tuned.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught SyntaxError: Syntax error at line 6 column 1 of the ...
Uncaught SyntaxError: Syntax error at line 6 column 1 of the JSON5 data. Still to read: "l\n" #279. Open. rss81 opened this issue...
Read more >
Error while parsing JSON - Unexpected EOF at line 1 column ...
Error while parsing JSON - Unexpected EOF at line 1 column 2 of the JSON5 data. when I npm run build - Stack...
Read more >
Error Occurs With installing .Babelrc - Codecademy Forums
... Error while parsing JSON - Syntax error at line 4 column 1 of the JSON5 data. Still to read: "“name”: “minesweeper”
Read more >
Bugs | The StoryGraph
When I am tracking my progress in a book, I use pages instead of percentage. In the past, when I've clicked into the...
Read more >
Reading to Children: Why It's So Important and How to Start
One of the most powerful things you can do for your child is to read with them. Learn more about the benefits, along...
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