question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Traceur not found : XHR (404 not found) error.

See original GitHub issue

[x] bug report

Current behavior On migration from _rc5 I got this :

zone.js:101 GET http://localhost:3000/traceur 404 (Not Found)scheduleTask @ zone.js:101ZoneDelegate.scheduleTask @ zone.js:345Zone.scheduleMacroTask @ zone.js:282(anonymous function) @ zone.js:122send @ VM526:3fetchTextFromURL @ system.src.js:1156(anonymous function) @ system.src.js:1739ZoneAwarePromise @ zone.js:607(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) 
![screen shot 2016-09-05 at 18 14 38]
@ system.src.js:4453(anonymous function) @ system.src.js:4705(anonymous function) @ system.src.js:408ZoneDelegate.invoke @ zone.js:332Zone.run @ zone.js:225(anonymous function) @ zone.js:591ZoneDelegate.invokeTask @ zone.js:365Zone.runTask @ zone.js:265drainMicroTaskQueue @ zone.js:497ZoneTask.invoke @ zone.js:437
(index):30 Error: Error: XHR error (404 Not Found) loading http://localhost:3000/traceur(…)(anonymous function) @ (index):30ZoneDelegate.invoke @ zone.js:332Zone.run @ zone.js:225(anonymous function) @ zone.js:591ZoneDelegate.invokeTask @ zone.js:365Zone.runTask @ zone.js:265drainMicroTaskQueue @ zone.js:497ZoneTask.invoke @ zone.js:437
66system.src.js:373 Assertion failed: loading or loaded

(https://cloud.githubusercontent.com/assets/4455130/18254447/c88a3950-7395-11e6-8654-8f7e87a0e99d.png) Expected/desired behavior To find main.js. There is absolutely no problem with the path, there are no multiline comments or additional third parties. I had no problems updating _rc5, but this hit me by a surprise.

Reproduction of the problem On npm start after the migration and solving all the errors from tsc I am unable to run the app as it comes up with some low level errors.

I realise it might not be for here, but I am stuck for a whole day on this.

  • Angular version: 2.0.0-rc.5 migration to -rc.6
  • Browser: [all]
  • Language: [TypeScript “^1.8.10”]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:40 (11 by maintainers)

github_iconTop GitHub Comments

6reactions
dbk4002commented, Oct 28, 2016

0 down vote There are multiple reason behind this error,

1)Sometimes comments mentioned on top of app.component.ts file 2)pointing to incorrect umd file 3)If you are using ts(Transcript) version, please mention the transpiler options in config.js file as below or compile your all .ts file to .js file using transpiler and then reference .js file in code:

(function (global) { System.config({ transpiler: ‘ts’, typescriptOptions: { tsconfig: true }, paths: { // paths serve as alias ‘npm:’: ‘node_modules/’ }, // map tells the System loader where to look for things map: { // our app is within the app folder app: ‘app’, // angular bundles ‘@angular/core’: ‘npm:@angular/core/bundles/core.umd.js’, ‘@angular/common’: ‘npm:@angular/common/bundles/common.umd.js’, ‘@angular/compiler’: ‘npm:@angular/compiler/bundles/compiler.umd.js’, ‘@angular/platform-browser’: ‘npm:@angular/platform-browser/bundles/platform-browser.umd.js’, ‘@angular/platform-browser-dynamic’: ‘npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js’, ‘@angular/http’: ‘npm:@angular/http/bundles/http.umd.js’, ‘@angular/router’: ‘npm:@angular/router/bundles/router.umd.js’, ‘@angular/forms’: ‘npm:@angular/forms/bundles/forms.umd.js’, // other libraries ‘rxjs’: ‘npm:rxjs’, ‘angular-in-memory-web-api’: ‘npm:angular-in-memory-web-api’, ‘angular2’ : ‘’ }, // packages tells the System loader how to load when no filename and/or no extension packages: { app: { main: ‘./main’, defaultExtension: ‘ts’ }, rxjs: { defaultExtension: ‘js’ }, ‘angular-in-memory-web-api’: { main: ‘./index.js’, defaultExtension: ‘js’ } } }); })(this);

6reactions
ericmdantascommented, Sep 5, 2016

Map your @angular modules to grab the .umd.js version of the build, as in: https://github.com/angular/quickstart/blob/master/systemjs.config.js

 System.config({
    paths: {
      // paths serve as alias
      'npm:': 'node_modules/'
    },
    // map tells the System loader where to look for things
    map: {
      // our app is within the app folder
      app: 'app',

      // angular bundles
      '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
      '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
      '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
      '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
      '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
      '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
      '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
      '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',

      // other libraries
      'rxjs':                       'npm:rxjs',
      'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
    },
    // packages tells the System loader how to load when no filename and/or no extension
    packages: {
      app: {
        main: './main.js',
        defaultExtension: 'js'
      },
      rxjs: {
        defaultExtension: 'js'
      },
      'angular2-in-memory-web-api': {
        main: './index.js',
        defaultExtension: 'js'
      }
    }
  });
Read more comments on GitHub >

github_iconTop Results From Across the Web

XHR Error (404 Not Found) loading http://localhost ... - GitHub
I have made it through https://angular.io/docs/ts/latest/tutorial/toh-pt5.html. After completing the "Simulating the web API" in https://angular ...
Read more >
XHR error (404 Not Found) loading http://localhost:3000/traceur
XHR error (404 Not Found) loading http://localhost:3000/traceur ... I'm getting following error when I'm trying to use Angular Material in ...
Read more >
(SystemJS) XHR error (404 Not Found) loading http://localhost ...
Hi i am using .net + angular 4 whenever i tried to import new module for example now i am importing FusionChartModule i...
Read more >
XHR error (404 Not Found) loading http://localhost:3000/traceur
I'm getting following error when I'm trying to use Angular Material in the code. zone.js:101 GET http://localhost:3000/traceur 404 (Not Found)scheduleTask ...
Read more >
XHR error (404 Not Found) loading angular2/http-angular.js
I found the solution. I was not using beta version of angular2 So I had to open my package.json and add this line...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found