2016-09-20 3 views
0

私は404 GET /traceurを手に入れていますが、私は何も出ていません。誰かがそれを見たいと思ったらGITに投稿しました。あなたはoutDirを構築しようと、このエラーが何かをすることはできません意味SOFを見ている見ることができます404 GET/traceurしかし角がどこにあるのかわからない

{ 
    "compilerOptions": { 
     "target": "es5", 
     "module": "commonjs", 
     "moduleResolution": "node", 
     "sourceMap": true, 
     "emitDecoratorMetadata": true, 
     "experimentalDecorators": true, 
     "removeComments": false, 
     "noImplicitAny": true, 
     "suppressImplicitAnyIndexErrors": true, 
     "outDir": "build" 
    }, 
    "exclude": [ 
     "app/node_modules", 
     "typings/main", 
     "typings/main.d.ts" 
    ] 
} 

tsconfig.json

GIT_HUB Link

systemjs.config.js

(function (global) { 
    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.ts', 
     defaultExtension: 'ts' 
     }, 
     rxjs: { 
     defaultExtension: 'js' 
     }, 
     'angular2-in-memory-web-api': { 
     main: './index.js', 
     defaultExtension: 'js' 
     } 
    } 
    }); 
})(this); 

ロードされる。しかし、ロードできないものを私に教えていないので、私は迷っています。私はoutDirを使用しているので、さらに設定する必要があります。

+0

404トレース・エラーは、多くの場合、インポートが欠落しているか、クラスの1つに不良があることが原因です。この質問への回答を確認することができます:http://stackoverflow.com/questions/37022526/angular-2-404-traceur-not-foundそれはあなたを助けるかもしれません。 – Supamiu

+0

'app: 'app'、' 'map obj'を' app: 'build'、 '? 'に変更できますか? – micronyks

+0

@micronyksありがとう、私はそれをしなければならなかったし、 'mainパッケージをmain.jsに変更して動作しています。今度は、 'TypeDecoratorエラーのすべてのパラメータを解決できません。 'というエラーが再び表示されます。ドローイングボードに戻ってください。 – Drew1208

答えて

0

これは私が変更しなければならなかったされています。私は私のtsconfig.jsonでoutDirを使用していたので

map: { 
     // our app is within the app folder 
     app: 'build', 

     // 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' 
     } 
    } 

を私はjsmapファイルが探されている場所を変更しなければなりませんでした。

また、tsのコメントは/** */であり、/* */ではありません。これはエラーの原因ともなります。

このエラーは何かを意味しますがロードされないことが問題です。

関連する問題