Angular2 ng-cli variable 'Module' must be of type 'NodeModule'

While working with angular-cli on a recent Angular 2 project, we came across this error:

BroccoliTypeScriptCompiler Variable 'module' must be of type 'NodeModule'

The quick fix*:

Open src/typings.d.ts and either comment out or remove this line:

declare var module: { id: string };

*Note: This is a temporary fix, and you will probably need to undo it later.

Previous Post Next Post