Angular-cli: ng g app-shell throws Error "Chunk cannot be found"

Created on 13 Dec 2017  路  3Comments  路  Source: angular/angular-cli

Versions

Angular CLI: 1.6.0
Node: 8.4.0
OS: linux x64
Angular: 5.1.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cdk: 5.0.1
@angular/cli: 1.6.0
@angular/material: 5.0.1
@angular-devkit/build-optimizer: 0.0.35
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.41
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.0
@schematics/angular: 0.1.10
@schematics/schematics: 0.0.10
typescript: 2.5.3
webpack: 3.7.1

Repro steps

  • ng new foobar
  • import RouterModule
  • ng g universal universal
  • ng g app-shell fooshell --universal-app universal

Observed behavior

The following error is thrown

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

Desired behavior

Guidance towards fixing the error, the error shouldn't occur

1 (urgent) broken

Most helpful comment

As a workaround, just delete the lines that import RouterModule (where you import it from @angular/router and also where you inject it in the @NgModule conifg) and let the cli generate them. You can add your route definitions afterwards.

All 3 comments

Closing...
Duplicate of angular/devkit#297

As a workaround, just delete the lines that import RouterModule (where you import it from @angular/router and also where you inject it in the @NgModule conifg) and let the cli generate them. You can add your route definitions afterwards.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

burdzand picture burdzand  路  100Comments

elvisbegovic picture elvisbegovic  路  100Comments

slubowsky picture slubowsky  路  107Comments

ankeshdave picture ankeshdave  路  161Comments

zpydee picture zpydee  路  102Comments