node_modules/@angular/router-deprecated/ 404 (Not Found)
See original GitHub issueI’m just following tour of heroes. npm installed everything fresh 30 mins ago (with no errors) and here is what I have:
On https://angular.io/docs/ts/latest/tutorial/toh-pt5.html Once I add
@RouteConfig([ { path: '/heroes', name: 'Heroes', component: HeroesComponent } ])
I get the following in my console:
zone.js:101 GET http://localhost:3000/node_modules/@angular/router-deprecated/ 404 (Not Found)scheduleTask @ zone.js:101ZoneDelegate.scheduleTask @ zone.js:336Zone.scheduleMacroTask @ zone.js:273(anonymous function) @ zone.js:122send @ VM1894:3fetchTextFromURL @ system.src.js:1156(anonymous function) @ system.src.js:1739ZoneAwarePromise @ zone.js:584(anonymous function) @ system.src.js:1738(anonymous function) @ system.src.js:2764(anonymous function) @ system.src.js:3338(anonymous function) @ system.src.js:3605(anonymous function) @ system.src.js:3990(anonymous function) @ system.src.js:4453(anonymous function) @ system.src.js:4705(anonymous function) @ system.src.js:408ZoneDelegate.invoke @ zone.js:323Zone.run @ zone.js:216(anonymous function) @ zone.js:571ZoneDelegate.invokeTask @ zone.js:356Zone.runTask @ zone.js:256drainMicroTaskQueue @ zone.js:474ZoneTask.invoke @ zone.js:426 (index):20 Error: Error: XHR error (404 Not Found) loading http://localhost:3000/node_modules/@angular/router-deprecated(…)
If I copy all app/app.component.ts (v2) from tutorial page, I get completely the same. Win 10, Chrome 49. Please help. Thank you!
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (8 by maintainers)
Top GitHub Comments
add @angular/router-deprecated along with the others there.
That will tell system.js where to find @angular/router-deprecated when you ask for it and not give a 404
`(function(global) {
// map tells the System loader where to look for things var map = { ‘app’: ‘app’, // ‘dist’, ‘rxjs’: ‘node_modules/rxjs’, ‘angular2-in-memory-web-api’: ‘node_modules/angular2-in-memory-web-api’, ‘@angular’: ‘node_modules/@angular’ };
// packages tells the System loader how to load when no filename and/or no extension var packages = { ‘app’: { main: ‘main.js’, defaultExtension: ‘js’ }, ‘rxjs’: { defaultExtension: ‘js’ }, ‘angular2-in-memory-web-api’: { defaultExtension: ‘js’ }, };
var packageNames = [ ‘@angular/common’, ‘@angular/compiler’, ‘@angular/core’, ‘@angular/http’, ‘@angular/platform-browser’, ‘@angular/platform-browser-dynamic’, ‘@angular/router’, ‘@angular/testing’, ‘@angular/upgrade’, ];
// add package entries for angular packages in the form ‘@angular/common’: { main: ‘index.js’, defaultExtension: ‘js’ } packageNames.forEach(function(pkgName) { packages[pkgName] = { main: ‘index.js’, defaultExtension: ‘js’ }; });
var config = { map: map, packages: packages }
// filterSystemConfig - index.html’s chance to modify config before we register it. if (global.filterSystemConfig) { global.filterSystemConfig(config); }
System.config(config);
})(this);
`