A
A
Asen1232021-10-07 21:08:12
Angular
Asen123, 2021-10-07 21:08:12

What could be the reason for the 'Loading chunk 436 failed' error?

When loading the admin and dashboard pages, an error pops up in the console: ERROR Error: Uncaught (in promise): ChunkLoadError: Loading chunk 436 failed, but there is no transition. The rest of the pages work great. What could be the problem? I will be grateful for the answer.
Routing file:

import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {LandingComponent} from './landing/landing.component';
import {AuthGuard} from '@common/guards/auth-guard.service';
import {ContactComponent} from '@common/contact/contact.component';
import {LinkPreviewHostComponent} from './shared/link-preview/link-preview-host/link-preview- 
host.component';
import {NOT_FOUND_ROUTES} from '@common/pages/not-found-routes';
import {GuestGuard} from '@common/guards/guest-guard.service';

const routes: Routes = [
{
    path: '',
    pathMatch: 'full',
    component: LandingComponent,
},
{
    path: 'pricing',
    redirectTo: 'billing/pricing',
},
{path: 'link-groups/:slug', redirectTo: ':slug'},
{
    path: 'dashboard',
    loadChildren: () =>
        import('src/app/dashboard/dashboard.module').then(
            m => m.DashboardModule
        ),
    canLoad: [AuthGuard],
},
{
    path: 'admin',
    loadChildren: () =>
        import('src/app/admin/app-admin.module').then(
            m => m.AppAdminModule
        ),
    canLoad: [AuthGuard],
},
{
    path: 'billing',
    loadChildren: () =>
        import('@common/billing/billing.module').then(m => m.BillingModule),
},

{
    path: 'api-docs',
    loadChildren: () =>
        import('@common/api-docs/api-docs.module').then(
            m => m.ApiDocsModule
        ),
},

{path: 'contact', component: ContactComponent},
{
    path: '**',
    pathMatch: 'full',
    component: LinkPreviewHostComponent,
    data: {willSetSeo: true},
},
...NOT_FOUND_ROUTES,
];

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

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question