3
votes

I upgraded my Angular 2 Plunker from RC.4 to RC.5 by doing the following:

  • updated systemjs.config.js to match the quickstart plunker
  • updated main.ts to match the quickstart plunker
  • created file app/app.module.ts, and populated it with what the quickstart plunker has

I don't see any other changes that are required for my simply plunker.

I keep getting this error: Error: TypeError: core_1.NgModule is not a function(…)

4

4 Answers

1
votes

I hit the exact same problem on my project. It worked on 1 pc, didn't work on another. Turns out the solution was simple:

Clear your browser cache

0
votes

Although I'm not sure what the problem is, this fixes it:

  • save your changes
  • reload the page/plunker

The error no longer appears. (I assume it has something to do with some old files that are not getting regenerated properly.)

0
votes

The tour of heroes tutorial has changed and introduced app.module.ts and also versions in systemjs.config.js for ex: ngVer is now @2.0.0-rc.5'. Replace the systemjs.config.js and everything worked fine for me.

0
votes

You can follow the angular upgrade rc4 to rc5 docs here: https://angular.io/docs/ts/latest/cookbook/rc4-to-rc5.html