0
I持って勝利に以下の設定X-64マシン:角度5 - WebPACKの問題
_ _ ____ _ ___
/\ _ __ __ _ _ _| | __ _ _ __ /___| | |_ _|
/△ \ | '_ \/_` | | | | |/ _` | '__| | | | | | |
/___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 1.5.5
Node: 9.2.0
OS: win32 x64
Angular: 5.0.4
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router
@angular/cdk: 5.0.0-rc.2
@angular/cli: 1.5.5
@angular/material: 5.0.0-rc.2
@angular-devkit/build-optimizer: 0.0.34
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.38
@ngtools/json-schema: 1.1.0
@schematics/angular: 0.1.8
typescript: 2.4.2
webpack: 3.8.1
I次のエラーMSG取得:
ERROR in C:/Users/xxx/documents/proj/data-collection/src/main.ts
Module build failed: Error: C:\Users\xxx\documents\proj\data-collection\src\main.ts is not part of the compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
at AngularCompilerPlugin.getCompiledFile (C:\Users\xxx\documents\proj\data-collection\node_modules\@angular\cli\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:643:23)
at plugin.done.then (C:\Users\xxx\documents\proj\data-collection\node_modules\@angular\cli\node_modules\@ngtools\webpack\src\loader.js:467:39)
at <anonymous>
@ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts
ERROR in C:/Users/xxx/documents/proj/data-collection/src/polyfills.ts
Module build failed: Error: C:\Users\xxx\documents\proj\data-collection\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 (C:\Users\xxx\documents\proj\data-collection\node_modules\@angular\cli\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:643:23)
at plugin.done.then (C:\Users\xxx\documents\proj\data-collection\node_modules\@angular\cli\node_modules\@ngtools\webpack\src\loader.js:467:39)
at <anonymous>
@ multi ./src/polyfills.ts
このproblは非常に後にも発生します新鮮:ng new foo
長いスレッドhereがありますが、それでも問題の根本に到達できませんでした。 @ngtools/webpack
バージョンでごまかすしようとしたが、これはあまりにも大きなcombinatoric問題であることが判明し
をマイpackage.json
ファイルは次のとおりです。
{
"name": "data-collection",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.0.4",
"@angular/cdk": "^5.0.0-rc.2",
"@angular/common": "^5.0.4",
"@angular/compiler": "^5.0.4",
"@angular/compiler-cli": "^5.0.4",
"@angular/core": "^5.0.4",
"@angular/forms": "^5.0.4",
"@angular/http": "^5.0.4",
"@angular/material": "^5.0.0-rc.2",
"@angular/platform-browser": "^5.0.4",
"@angular/platform-browser-dynamic": "^5.0.4",
"@angular/platform-server": "^5.0.4",
"@angular/router": "^5.0.4",
"common-tags": "^1.5.1",
"polyfills": "^2.1.1",
"rxjs": "^5.5.2",
"zone": "^0.3.4"
},
"devDependencies": {
"@angular/cli": "^1.5.5",
"typescript": "^2.4.2"
}
}
私はそれが解決策ではないことを知っていますが、angular-cli 1.5.3でも問題ありません。あなたは最も多くのrecientの角度cliをアンインストールし、1.5.3をインストールすることができます:npmアンインストール-g @ angular/cli; npmキャッシュ検証; npm install -g @ angular/cli @ 1.5.3 – Eliseo