Skip to content

appShell fails if the app already has a RouterModule #12138

Closed
@alexeagle

Description

@alexeagle

From @cexbrayat on November 24, 2017 23:18

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Area

- [ ] devkit
- [x] schematics

Versions

Repro steps

Generate a new app ng new hello.

Edit app.module.ts to add a RouterModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { AppComponent } from './app.component';

const routes: Routes = [];

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    RouterModule.forRoot(routes)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Add router-outlet in index.html.
Run unviersal: ng g universal server-app
Run appShell: ng g app-shell shell --universal-app serverA-app

The log given by the failure

Error: Chunk cannot be found.
Chunk cannot be found.

Copied from original issue: angular/devkit#297

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions