承诺中未处理的拒绝| Compodoc |角度的

我正在使用Compodoc为角度应用生成文档,网址为:https://github.com/compodoc/compodoc

在生成文档时,出现错误。那时,脚本正在访问app-routing.module.ts文件。

[18:06:24] parsing        : ../src/app/app-routing.module.ts
[18:06:24] Analysing routes definitions and clean them if necessary
Unhandled Rejection at: Promise {
<rejected> Error: Could not find the node's symbol.

这是我的app-routing.module.ts

import { NgModule } from '@angular/core';
import { Routes,RouterModule } from '@angular/router';
import { AuthRestrictGuard,AuthGuard,AppUserLoadedGuard,RoleGuard } 
from '@project-core/auth';

const routes: Routes = [
{
    path: '',loadChildren: () => 
import('./public/landing/landing.module').then(module => 
module.LandingModule),canactivate: [AuthRestrictGuard]
},{
    path: 'jumping-page',loadChildren: () => import('@project-business/core/project-jumping- 
page/project-jumping-page.module')
        .then(module => module.ProjectJumpingPageModule),canactivate: [AuthGuard,RoleGuard],data: {
        roles: [RolesEnum.Admin,RolesEnum.MemberAdmin,RolesEnum.MemberUser]
    }
},{
    path: 'profile',loadChildren: () => import('@project-business/core/project- 
profile/project-profile.module')
        .then(module => module.ProjectProfileModule),AppUserLoadedGuard]
},{
    path: 'errors',loadChildren: () => import('./core/errors/errors.module').then(module 
=> module.ErrorsModule)
},{
    path: '**',redirectTo: 'errors',pathMatch: 'full'
},];

@NgModule({
imports: [RouterModule.forRoot(routes)],exports: [RouterModule]
})
export class AppRoutingModule { }

有运气吗?

mdxdr 回答:承诺中未处理的拒绝| Compodoc |角度的

有关于这个的 ts 依赖错误。避免路由类型定义可能是解决此问题的一种解决方法,直到它得到解决

,

我们已经在使用 import(...).then(...) Promise。 问题发生了。

{
    path: '/test',loadChildren: () => import('./routes/test').then(mod => mod.TestModule),...
},

Compodoc:1.1.11 Compodoc 使用的 TypeScript 版本:2.9.1 当前项目的 TypeScript 版本:4.1.5 Node.js 版本:v14.15.3 提示:它适用于 --disableRoutesGraph 标志

本文链接:https://www.f2er.com/2804458.html

大家都在问