Encountered a similar issue while transitioning from Angular RC6 to version 2.0.0, specifically related to the systemjs.config.js
file.
I ended up starting fresh and reworking the entire systemjs.config.js
based on the updated instructions provided in the latest quick start guide: https://angular.io/docs/ts/latest/quickstart.html#!#add-config-files, making some adjustments along the way.
One noticeable issue in your systemjs.config.js
is the absence of references to the following packages:
- es6-shim (or core-js)
- reflect-metadata
- zone.js
Below is a snippet from my revised systemjs.config.js
(function (global) {
System.config({
paths: {
'npm:': '/node_modules/'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: '/app',
// angular bundles
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
// other libraries
'es6-shim': 'npm:es6-shim',
'reflect-metadata': 'npm:reflect-metadata',
'rxjs': 'npm:rxjs',
'zone.js': 'npm:zone.js'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
'app': { main: 'main.js', defaultExtension: 'js' },
'es6-shim': { main: 'es6-shim.min.js', defaultExtension: 'js' },
'reflect-metadata': { main: 'Reflect.js', defaultExtension: 'js' },
'rxjs': { main: 'bundles/Rx.min.js', defaultExtension: 'js' },
'zone.js': { main: 'dist/zone.min.js', defaultExtension: 'js' }
}
});
})(this);