Trying to run an Angular 2 project and implement @angular/router
is proving to be a bit challenging.
Everything seems to be working fine, until the moment I attempt:
import { provideRouter, RouterConfig } from '@angular/router';
As it tries to locate:
http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js
Which leads to the error:
Error: GET http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js 404 (Not Found)
There seems to be no /bundle/router.umd.js
The reason Angular is looking for this specific file is because of:
var ngPackageNames = [
'common',
'compiler',
'core',
'forms',
'http',
'platform-browser',
'platform-browser-dynamic',
'router',
'router-deprecated',
'upgrade',
];
// Bundled (~40 requests):
function packUmd(pkgName) {
packages['@angular/'+pkgName] = { main: 'bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
}
Here is the content of 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",
...
Attempting to update the package using npm install @angular/router
results in the following error:
├── UNMET PEER DEPENDENCY @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ea8985988faad8c4dac4dac79889c4d9">[email protected]</a>
├── UNMET PEER DEPENDENCY @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2d4559595d6d1f031d031d005f4e031e">[email protected]</a>
└── @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="097b667c7d6c7b493a27392739246865796168273e">[email protected]</a>
It's apparent that Angular2 is still in Beta. Any guidance on this issue would be greatly appreciated.