Skip to content

Webpack Failed to Compile after Typescript 2.3.1 upgrade #6109

@omargon

Description

@omargon

Getting the following error message on ng start or ng test after upgrading Typescript to 2.3.1

webpack: Failed to compile.
[karma]: Error: AppModule is not an NgModule               
    at Compiler.compiler.plugin (.../node_modules/@angular/cli/plugins/karma-webpack-throw-error.js:10:23)

Versions.

→ ng --version
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.0.1
node: 6.9.5
os: darwin x64
@angular/common: 4.1.0
@angular/compiler: 4.1.0
@angular/core: 4.1.0
@angular/forms: 4.1.0
@angular/http: 4.1.0
@angular/platform-browser: 4.1.0
@angular/platform-browser-dynamic: 4.1.0
@angular/router: 4.1.0
@angular/cli: 1.0.1
@angular/compiler-cli: 4.1.0

Repro steps.

Upgrade Typescript to 2.3.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions