0
我越來越404 GET /traceur
但我沒有什麼可走的。我把它發佈在GIT上,以防有人想看它。404 GET/traceur,但不告訴我在哪裏角2
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);
tsconfig.json
{
"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"
]
}
你可以看到outDir
是要建立和SOF此錯誤看着意味着什麼不可能加載。但它不告訴我什麼不能裝載,所以我迷路了。我是否需要更多配置,因爲我正在使用outDir
。
404 traceur錯誤通常是由於缺少導入,或者是您的某個類中的錯誤導入。你可以檢查這個問題的答案:http://stackoverflow.com/questions/37022526/angular-2-404-traceur-not-found它可能會幫助你。 – Supamiu
你能改變'app:'app','map obj'爲'app:'build','? – micronyks
謝謝@micronyks我不得不這麼做,然後將'package main:main.js'改成它正在工作。現在我得到'無法再次解決TypeDecorator'的所有參數錯誤。猜猜畫板。 – Drew1208