i\'m upgrading my Angular 2 project from RC5 to 2.0.0. I get this Error
Unhandled Promise rejection: Component LoginComponent is not part of any NgM
I had the same error. I had a lot of components and had missed some out in app.module.ts but I was not sure which ones.
I found out by adding a log statement to ..
/node_modules/@angular/compiler/bundles/compiler.umd.js
// I ADDED THIS LOG STATEMENT
console.log('compType', String(compType));
// THIS LINE EXISTS ALREADY
throw new Error("Component " + stringify(compType) + " is not part of any NgModule or the module has not been imported into your module.");
The log statement shows you which component you forgot to add to app.module.ts .. just click the output of the log statement in the browser console tab for details.
Remove the log statement when you are done.
NOTE: Make sure you are using compiler.umd.js (NOT compiler.umd.min.js) in your SystemJS config file.