1
我我當前的角2的項目更新到角4,現在,得到了這些錯誤:角4編譯失敗真棒,打字稿裝載機
Module build failed: TypeError: Cannot read property 'exclude' of undefined
at applyDefaults (/Users/frankhe/jnpr_csc/node_modules/awesome-typescript-loader/src/instance.ts:266:72)
包JSON是:
"@angular/animations": "^4.0.1",
"@angular/common": "^4.0.1",
"@angular/compiler": "^4.0.1",
"@angular/compiler-cli": "^4.0.1
"angular2-load-children-loader": "^0.1.3",
"angular2-template-loader": "^0.4.0",
"typescript": "^2.0.3",
"awesome-typescript-loader": "^2.2.4",
"css-loader": "^0.23.1",
"es6-promise-loader": "^1.0.1",
和我的tsconfig是
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true
}
}
任何想法爲什麼編譯失敗?
感謝
感謝。但現在我遇到了另一個問題:[at-loader]中的錯誤./node_modules/@swimlane/ngx-datatable/release/components/datatable.component.d.ts:414:16 TS2314:泛型類型'IterableDiffer'需要1個類型參數。所以我想排除node_modules,但是當我添加「node_modules」來排除tsconfig時,這個目錄不能被忽略。任何想法? –
user3006967
@ user3006967聽起來像一些依賴關係已過時。您將無法排除node_modules,因爲該文件夾用於編譯打字稿。確保您的ngx數據庫已更新到最新版本 –
此外,如果您發現遇到更多錯誤,則可能需要將打字稿降級到「2.0.10」,並查看需要的位置。這兩個包可以挑剔在一起 –