[BUG] Route parsing error
See original GitHub issueOverview of the issue
I have the following issue:
[08:45:30] parsing : D:/xxx/xxx-xx-routing.module.ts [08:45:30] Routes parsing error, maybe a trailing comma or an external variable, trying to fix that later after sources scanning.
My routing module is:
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AuthGuardService } from '../common/services/auth-guard.service';
import { AComponent} from './a.component';
import { Role } from '../common/model/enum/role.enum';
const routes: Routes = [
{
path: 'a-path',
component: AComponent,
data: { requiresLoggedIn: true, requiresRole: [ Role.ROLE_XXX ] },
canActivate: [ AuthGuardService ]
}
];
@NgModule({
imports: [
RouterModule.forChild(routes)
],
exports: [
RouterModule
]
})
export class XXXRoutingModule { }
And my command in package.json is:
“compodoc”: "./node_modules/.bin/compodoc -p src/tsconfig.app.json -n ‘Documentation-Angular’ --theme readthedocs -s
The issue is not a comma. The problem seems to be there:
data: { requiresLoggedIn: true, requiresRole: [ Role.ROLE_XXX ] },
canActivate: [ AuthGuardService ]
When I remove this part of code, there is no problem.
What could be the solution ?
Compodoc installed globally or locally ?
locally
Versions
compodoc: 1.0.0-beta.10 npm: 5.0.4 node: 8.0.0 Windows 10
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Cisco Bug - Error(2) parser is unable to parse nono IP route vrf
Symptoms: The following error is encountered in Console logfile: %AAA-3-PARSEERR: Error(2) parser is unable to parse nono IP route vrf ...
Read more >NEWS.txt - Routino
Fix bug with parsing XML containing UTF-8 characters four bytes long. Fix two bugs for simple routes with the option of not passing...
Read more >Parsing error [bug?] with systems of nonlinear PDEs ...
Also note there is an obvious workaround, which is to go the "FEM programming" route and just specify the pde coefficients via ...
Read more >ISE 14.7 Warning: Parsing error for file xxx.ptwx - Xilinx Support
After Place & Route when I click on "2 Failing Constraints" in the Design Overview Summary I get the following Warning message: "Parsing...
Read more >1790798 – "oc adm catalog mirror" fails to parse the source ...
Bug 1790798 - "oc adm catalog mirror" fails to parse the source image ... error parsing target reference for default-route-openshift-image-registry.apps.qe- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same problem
following issue:
routing module is:
Compodoc installed globally or locally ? locally
Versions
compodoc: 1.0.9 node: 8.9.4 Mac OS X version 10.11.6
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.