I am trying to start an Angular 2 project and implemenet @angular/router.
The application works fine until I try:
import { provideRouter, RouterConfig } from '@angular/router';
because he is trying to find:
http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js
that leads to:
Error: GET http:
No /bundle/router.umd.js
Angular is trying to find this file because of:
var ngPackageNames = [
'common',
'compiler',
'core',
'forms',
'http',
'platform-browser',
'platform-browser-dynamic',
'router',
'router-deprecated',
'upgrade',
];
function packUmd(pkgName) {
packages['@angular/'+pkgName] = { main: 'bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
}
Here package.json:
...
"dependencies": {
"@angular/common": "2.0.0-rc.3",
"@angular/compiler": "2.0.0-rc.3",
"@angular/core": "2.0.0-rc.3",
"@angular/forms": "0.1.1",
"@angular/http": "2.0.0-rc.3",
"@angular/platform-browser": "2.0.0-rc.3",
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
"@angular/router": "3.0.0-alpha.7",
...
I am trying to update a package using npm install @angular/router, but I get this error:
├── UNMET PEER DEPENDENCY @angular/core@2.0.0-rc.3
├── UNMET PEER DEPENDENCY @angular/http@2.0.0-rc.3
└── @angular/router@3.0.0-alpha.7
I understand that Angular2 is still in beta. Any help here?