-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
ERROR in AppModule is not an NgModule
- bug report
Versions.
@angular/cli: 1.0.0-rc.4
node: 6.9.1
os: win32 x64
@angular/animations: 4.0.0-rc.5
@angular/common: 4.0.0-rc.5
@angular/compiler: 4.0.0-rc.5
@angular/core: 4.0.0-rc.5
@angular/forms: 4.0.0-rc.5
@angular/http: 4.0.0-rc.5
@angular/platform-browser: 4.0.0-rc.5
@angular/platform-browser-dynamic: 4.0.0-rc.5
@angular/router: 4.0.0-rc.5
@angular/cli: 1.0.0-rc.4
@angular/compiler-cli: 4.0.0-rc.5
Repro steps.
Running Angular RC5 and CLI RC2 a ng build
works. Updating to CLI RC 4 with yarn it fails with
ERROR in AppModule is not an NgModule
if TypeScript is set to 2.2.1
. If installed with NPM everything works as normal.
The log given by the failure.
ERROR in AppModule is not an NgModule
Mention any other details that might be useful.
Location of bug: I had typescript pinned to version 2.2.1
(latest) but for some reason after upgrading to CLI RC4 that fails when using Yarn. Moving the version back down to 2.1.x
solves this bug. This happens on Mac and Windows. Create a new CLI project and pin typescript to 2.2.1
to get the error.