IvanMoreno
IvanMoreno

Reputation: 145

@angular/router is not installed correctly

I¡m trying to updgrade my @angular/router dependency from 2.0.0 to 3.0.0-alpha.7

I have added it to package.json

{
  "name": "angular2-quickstart",
  "version": "1.0.0",
  "scripts": {
    "start": "tsc && concurrently \"npm run tsc:w\"",
    "postinstall": "typings install",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "typings": "typings"
  },
  "license": "ISC",
  "dependencies": {
    "@angular/common": "2.0.0-rc.2",
    "@angular/compiler": "2.0.0-rc.2",
    "@angular/core": "2.0.0-rc.2",
    "@angular/http": "2.0.0-rc.2",
    "@angular/platform-browser": "2.0.0-rc.2",
    "@angular/platform-browser-dynamic": "2.0.0-rc.2",
    "@angular/router": "^3.0.0-alpha.7",
    ........
  },

}

When I use "npm install" router is installed but "bundles" folder is not created. enter image description here

So, when I try to run my project I get this error:

GET http://localhost:5000/node_modules/@angular/router/bundles/router.umd.js 404 (Not Found)

Someboy knows what could be happening?

Thanks Iván.

Upvotes: 2

Views: 711

Answers (2)

IvanMoreno
IvanMoreno

Reputation: 145

It has been solved in version alpha-8.

Thanks for your answers.

Upvotes: 1

Sanket
Sanket

Reputation: 20037

Make sure you have latest systemjs.config.js file. Below block is added few days back after RC2 release (and before RC3 release)-

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

Upvotes: 0

Related Questions