-2

I am creating an public extension for angular2+ community, and the demo won´t run as espected, maybe i am doing something wrong, the error is:

Fetch error: 404 Not Found
Instantiating http://localhost:3000/typescript
Loading typescript
Unable to load transpiler to transpile http://localhost:3000/demo/main.ts
Instantiating http://localhost:3000/demo/main.ts
Loading demo
at system.js:4
at ZoneDelegate.invoke (zone.js:392)
at Zone.run (zone.js:142)
at zone.js:844
at ZoneDelegate.invokeTask (zone.js:425)
at Zone.runTask (zone.js:192)
at drainMicroTaskQueue (zone.js:602)
at <anonymous>

Take a time to see the code on Github, I updated with the problem, so anyone can help me?

Thanks for your time.

Tiago Diaz
  • 21
  • 7

2 Answers2

0

You probably have a multiline-comment, and within that comment, you probably have an import-statement

compare this: https://github.com/angular/angular/issues/12967

/*  import { CrisisListComponent }  from './crisis-list.component';
    import { HeroListComponent }    from './hero-list.component';    */

System.JS uses a regex to look for import-statements and thus will find them even in commented-out codeblocks

To solve the issue, comment-out each import-statement with a line-comment

//import { CrisisListComponent }  from './crisis-list.component';
//import { HeroListComponent }    from './hero-list.component';

Beyond that you might want to google for "Unable to load transpiler to transpile" because thats the root-cause of your problem

Tobias Gassmann
  • 11,399
  • 15
  • 58
  • 92
  • Allready looked at it, my code as an multiline comment but without import, removed the comment and the same error happens, as i sayed, allready tryed a lot of hints... – Tiago Diaz Aug 29 '17 at 18:40
0

Figured it out, the problem was with the typescript map, i added an manual typescript.js mapping as described on core below and it is not giving any more errors, thanks for your time.

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/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/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
    '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
    // other libraries
    'rxjs': 'npm:rxjs',
    'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',

    'typescript': 'npm:typescript/lib/typescript.js'
},
Tiago Diaz
  • 21
  • 7