Sau khi nâng cấp lên góc 5 và Cli 1.5, trên ng serve
Tôi nhận được một lỗi:góc 5 webpack biên soạn lỗi
ERROR in ./node_modules/@stomp/ng2-stompjs/index.ts
Module build failed: Error: ...\project\node_modules\@stomp\ng2-stompjs\index.ts is not part of the compilation output. Please check the other error messages for details.
at AngularCompilerPlugin.getCompiledFile (...\project\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:629:23)
at plugin.done.then (...\project\node_modules\@ngtools\webpack\src\loader.js:467:39)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
@ ./src/app/app.module.ts 27:0-63
@ ./src/main.ts
@ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
Tôi đã cố gắng thêm include
để tôi tsconfig.app.json
để nó trông như thế này:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2015",
"baseUrl": "",
"types": []
},
"include": [
"../node_modules/@stomp/**/*.ts"
],
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
tôi đã cố gắng tái chạy ng serve
tôi nhận được một lỗi:
ERROR in ./src/main.ts
Module build failed: Error: ...project\chatAngular4\src\main.ts is not part of the compilation output. Please check the other error messages for details.
at AngularCompilerPlugin.getCompiledFile (...project\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:629:23)
at plugin.done.then (...project\node_modules\@ngtools\webpack\src\loader.js:467:39)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
@ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
ERROR in ./src/polyfills.ts
Module build failed: Error: C:\Users\MEP2\Desktop\chatAngular4\src\polyfills.ts is not part of the compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
at AngularCompilerPlugin.getCompiledFile (...project\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:624:23)
at plugin.done.then (...project\node_modules\@ngtools\webpack\src\loader.js:467:39)
at <anonymous>
@ multi ./src/polyfills.ts
Điều này có vẻ như nó cần một số loại giải pháp chung. Ý tưởng nào?
Cập nhật
Sau khi cập nhật tất cả các gói lên phiên bản mới nhất, vấn đề disapeared
stomp js là để được đổ lỗi cho tôi đoán –
''suppressImplicitAnyIndexErrors": true, 'thêm tệp này vào tệp tsconfig của bạn – Aravind
Thay đổi Angular 5 chưa được phát hành cho NPM. Ngoài ra, nó chưa được sửa hoàn toàn. –