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.

SystemJS not loading (traceur.js)

See original GitHub issue

When I try to import this module via SystemJS I get the following error.

"(SystemJS) XHR error (404 Not Found) loading http://localhost/pim/traceur.js
	Error: XHR error (404 Not Found) loading http://localhost/pim/traceur.js
	    at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost/pim/node_modules/zone.js/dist/zone.js:1190:29) [<root>]
	    at Zone.runTask (http://localhost/pim/node_modules/zone.js/dist/zone.js:166:47) [<root> => <root>]
	    at XMLHttpRequest.ZoneTask.invoke (http://localhost/pim/node_modules/zone.js/dist/zone.js:416:38) [<root>]
	Error loading http://localhost/pim/traceur.js
	Unable to load transpiler to transpile http://localhost/pim/node_modules/angular2-tree-component/dist/angular2-tree-component.js
	Error loading http://localhost/pim/node_modules/angular2-tree-component/dist/angular2-tree-component.js as "angular2-tree-component" from http://localhost/pim/app/app.module.js"

My current systemjs.config.js file:

(function (global) {
    System.config({
        defaultJSExtensions: true,
        paths: {
            // paths serve as alias
            'npm:': 'node_modules/',
            'dragula': 'node_modules/dragula/dist/dragula.js'
        },
        // 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',
            "ng2-bootstrap": 'npm:ng2-bootstrap/bundles/ng2-bootstrap.umd.js',
            "ng2-charts": 'npm:ng2-charts/bundles/ng2-charts.umd.js',
            "moment": 'npm:moment/moment.js',
            'angular2-tree-component': 'npm:angular2-tree-component',
            'lodash': 'npm:lodash',
            'ng2-file-upload': 'npm:ng2-file-upload/bundles/ng2-file-upload.umd.js',
            'ng2-validation': 'npm:ng2-validation/bundles/ng2-validation.umd.js',
            'ng2-dragula': 'npm:ng2-dragula',
            'ng2-select': 'npm:ng2-select/index.js'
        },
        // packages tells the System loader how to load when no filename and/or no extension
        packages: {
            app: {
                main: './main.js',
                defaultExtension: 'js'
            },
            rxjs: {
                main: './Rx.js',
                defaultExtension: 'js'
            },
            'angular2-tree-component': {
                main: 'dist/angular2-tree-component.js',
                defaultExtension: 'js'
            },
            'lodash': {
                main: 'lodash.js',
                defaultExtension: 'js'
            }
        }
    });
})(this);

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
adamkleingitcommented, Feb 22, 2017

Updated

1reaction
EdmondChuiHWcommented, Feb 21, 2017

I fixed it here https://github.com/500tech/angular2-tree-component/issues/160#issuecomment-280161341, make sure you’re on 2.8.1. Use the following map for SystemJS, no entry in packages required.

map: {
  // angular bundles
  '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
  …
  'angular2-tree-component': 'node_modules/angular2-tree-component/dist/angular2-tree-component.umd.js',
  …
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

SystemJS not loading (traceur.js) · Issue #187 - GitHub
When I try to import this module via SystemJS I get the following error. "(SystemJS) XHR error (404 Not Found) loading http://localhost/pim/ ...
Read more >
(SystemJS) XHR error (404 Not Found) loading http://localhost ...
I spent hours on this issue and finally I fixed this by changing line in system.config.js in main section map: { // our...
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 >
systemjs/systemjs - Gitter
I got '404 traceur not found' error in the chrome's console. ... using the Sass loader plugin to transpile SCSS into CSS and...
Read more >
systemjs - npm
Start using systemjs in your project by running `npm i systemjs`. ... To load ES6, locate a transpiler ( traceur.js , 'browser.js' from ......
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