Sasi Dhivya Sasi Dhivya - 11 months ago 71
AngularJS Question

Angular 2 - Upgrading into rc4 throws script error

I have tried to update my angular 2 version to 2.0.0.rc.4 but its throws script error after performing npm install , npm start.

Please refer my package.json file below

"dependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/http": "2.0.0-rc.4",
"@angular/forms": "0.2.0",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/router": "3.0.0-beta.1",
"@angular/router-deprecated": "2.0.0-rc.2",
"systemjs": "0.19.27",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12",
"core-js": "^2.4.0"
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.1.0",
"typescript": "^1.8.7",


below is my sample app.component.ts file

import {Component} from '@angular/core';
import { bootstrap } from '@angular/platform-browser-dynamic';
import { disableDeprecatedForms, provideForms } from '@angular/forms';

import {CORE_DIRECTIVES, FORM_DIRECTIVES, FormBuilder,Validators,Control,ControlGroup } from '@angular/common';

selector: 'ej-app',
templateUrl: 'app/app.component.html',
directives: [ CORE_DIRECTIVES]
bootstrap(AppComponent, [
]).catch((err: any) => console.error(err));

export class AppComponent {

employeeDob: Date;
constructor(private myform: FormBuilder) {

This changes throws script error like below
enter image description here

Can you please suggest to update the angular version with no issues


Update your systemjs.config.js file. The location of the .umd.js files has changed to its own bundles folder:

var ngPackageNames = [

ngPackageNames.forEach(function(pkgName) {
    packages['@angular/'+pkgName] = { main: 'bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };

For further information, check the quickstart guide of angular2