2017-08-01 29 views
0

クライアントサイドのモジュール管理とスクリプトの連結にwebpackを使用する単純なnodejs辞書アプリケーションがあります。私のローカルマシンではすべて正常に動作します。今私はAzureのCIでいくつかの実験をしています。 visualstudio.comのCIを使用したAzureの継続的な配信オプションを使用したこの実験では、webpackタスクを実行するときに次のエラーが発生しました(マーケットプレイスからwebpackタスクを使用しています)。誰か助けてくれますか?WebpackはCI - TS2688でエラーを返します: 'reflect-metadata'のタイプ定義ファイルが見つかりません

WebPACKのビルドタスク固有のログファイルは言う:

ここ
2017-07-31T13:44:16.2307812Z ##[section]Starting: webpack 
2017-07-31T13:44:16.2307812Z ============================================================================== 
2017-07-31T13:44:16.2307812Z Task   : webpack 
2017-07-31T13:44:16.2307812Z Description : bundle your assets, scripts, images, styles 
2017-07-31T13:44:16.2307812Z Version  : 3.0.19 
2017-07-31T13:44:16.2307812Z Author  : Dealogic 
2017-07-31T13:44:16.2307812Z Help   : [More information](https://marketplace.visualstudio.com/items?itemName=Dealogic.webpack-vsts-extension) [webpack](https://webpack.github.io/) 
2017-07-31T13:44:16.2307812Z ============================================================================== 
2017-07-31T13:44:16.4428024Z webpack 
2017-07-31T13:44:16.4447837Z webpackConfigLocation: ./webpack.browser.config.js 
2017-07-31T13:44:16.4447837Z treatErrorsAs: warnings 
2017-07-31T13:44:16.4447837Z treatWarningsAs: warnings 
2017-07-31T13:44:16.4447837Z workingFolder: d:\a\1\s 
2017-07-31T13:44:16.4447837Z webpackModuleLocation: null 
2017-07-31T13:44:16.4457843Z webpack module resolution started 
2017-07-31T13:44:16.7987854Z webpack module resolution finished 
2017-07-31T13:44:16.7987854Z webpack config resolution started 
2017-07-31T13:44:16.7997851Z webpack config resolution finished 
2017-07-31T13:44:16.7997851Z compilation of the webpack project is started 
2017-07-31T13:44:17.3707894Z 
2017-07-31T13:44:17.3707894Z [at-loader] Using [email protected] from typescript and "tsconfig.json" from d:\a\1\s\client\tsconfig.json. 
2017-07-31T13:44:17.3707894Z 
2017-07-31T13:44:19.1378300Z 
2017-07-31T13:44:19.1378300Z [at-loader] Checking started in a separate process... 
2017-07-31T13:44:19.5368391Z 
2017-07-31T13:44:19.5368391Z [at-loader] Checking finished with 1 errors 
2017-07-31T13:44:19.5428397Z compilation of the webpack project is done 
2017-07-31T13:44:19.5498387Z Hash: 1f80fddb56bf16ebb0f6 
2017-07-31T13:44:19.5498387Z Version: webpack 3.4.1 
2017-07-31T13:44:19.5498387Z Time: 2631ms 
2017-07-31T13:44:19.5498387Z    Asset Size Chunks    Chunk Names 
2017-07-31T13:44:19.5498387Z  app-bundle.js 146 kB  0 [emitted] main 
2017-07-31T13:44:19.5498387Z app-bundle.js.map 179 kB  0 [emitted] main 
2017-07-31T13:44:19.5498387Z [4] ./node_modules/inversify/lib/annotation/decorator_utils.js 2.56 kB {0} [built] 
2017-07-31T13:44:19.5498387Z [5] ./node_modules/inversify/lib/utils/guid.js 352 bytes {0} [built] 
2017-07-31T13:44:19.5498387Z [7] ./node_modules/inversify/lib/inversify.js 1.93 kB {0} [built] 
2017-07-31T13:44:19.5498387Z [8] ./client/src/Dependency/DependencyIdentifiers.js 395 bytes {0} [built] 
2017-07-31T13:44:19.5498387Z [11] ./node_modules/reflect-metadata/Reflect.js 48 kB {0} [built] 
2017-07-31T13:44:19.5498387Z [14] ./node_modules/inversify/lib/syntax/constraint_helpers.js 1.48 kB {0} [built] 
2017-07-31T13:44:19.5498387Z [15] ./node_modules/inversify/lib/planning/metadata_reader.js 962 bytes {0} [built] 
2017-07-31T13:44:19.5498387Z [16] ./client/src/index.ts 1.29 kB {0} [built] 
2017-07-31T13:44:19.5498387Z [17] ./client/src/Dependency/DependencyManager.js 983 bytes {0} [built] 
2017-07-31T13:44:19.5498387Z [18] ./client/src/Services/WordFetcherImpl.js 2.18 kB {0} [built] 
2017-07-31T13:44:19.5498387Z [45] ./node_modules/inversify/lib/annotation/post_construct.js 722 bytes {0} [built] 
2017-07-31T13:44:19.5498387Z [46] ./node_modules/process/browser.js 5.42 kB {0} [built] 
2017-07-31T13:44:19.5498387Z [48] ./client/src/Utils/UriUtils.js 356 bytes {0} [built] 
2017-07-31T13:44:19.5498387Z [49] ./client/src/Services/OxfordHelper.js 1.29 kB {0} [built] 
2017-07-31T13:44:19.5498387Z [50] ./client/src/Services/DictionaryService.js 2.13 kB {0} [built] 
2017-07-31T13:44:19.5498387Z  + 36 hidden modules 
2017-07-31T13:44:19.5498387Z 
2017-07-31T13:44:19.5498387Z ERROR in [at-loader] TS2688: Cannot find type definition file for 'reflect-metadata'. 
2017-07-31T13:44:19.5568407Z ##[warning]webpack partially succeeded 
2017-07-31T13:44:19.5568407Z ##[warning]webpack: [at-loader] TS2688: Cannot find type definition file for 'reflect-metadata'. 
2017-07-31T13:44:19.5568407Z webpack summary section markdown file creation is started 
2017-07-31T13:44:19.5568407Z webpack sumamry section markdown file is created with the name 'd:\a\1\s\webpack.webpack.result.md' 
2017-07-31T13:44:20.0895996Z ##[section]Finishing: webpack 

が間違っている可能性が何package.json

"dependencies": { 
    "async": "^2.5.0", 
    "compression": "^1.7.0", 
    "express": "^4.15.3", 
    "inversify": "^4.2.0", 
    "reflect-metadata": "^0.1.10", 
    "request": "^2.81.0" 
    }, 
    "devDependencies": { 
    "@types/async": "^2.0.40", 
    "@types/compression": "0.0.33", 
    "@types/express": "^4.0.36", 
    "@types/jasmine": "^2.5.53", 
    "@types/node": "^8.0.14", 
    "@types/request": "^2.0.0", 
    "awesome-typescript-loader": "^3.2.1", 
    "jasmine": "^2.6.0", 
    "jasmine-console-reporter": "^1.2.7", 
    "typescript": "*", 
    "typings": "^2.1.1", 
    "webpack": "^3.0.0" 
    } 

からの依存性フラグメントのですか?

+0

「reflect-metadata」が依存関係に存在することがわかります。しかし、ディスク上にそれが見つからないためノードは失敗します。再インストールまたはインストールを試みてください。 npm反映 - メタデータ –

答えて

0

これは、MS TFSの問題の詳細です。エージェントを「Hosted VS2017」から「Hosted Linux Preview」に変更したところ、すべて正常に機能しました!

フードの下で何が起こっているのかよく分かりません。

0

は反映-メタデータを@typesをインストールしてください:https://www.npmjs.com/package/@types/reflect-metadata

npm i -D @types/reflect-metadata 

たぶん、あなたはtsconfig.jsonにそれを追加する必要があり、現在の設定に依存します。

関連する問題