更新NPM模塊後,我試圖運行ng build -prod
這是以前工作正常,我不斷收到以下錯誤:類型錯誤「NPM更新」和「NG構建-prod」
TypeError: extractedChunk.getNumberOfModules is not a function at ExtractTextPlugin.<anonymous> (/Users/myUserName/dev-test/demo/node_modules/extract-text-webpack-plugin/dist/index.js:246:32) at Array.forEach (native) at Compilation.<anonymous> (/Users/myUserName/dev-test/demo/node_modules/extract-text-webpack-plugin/dist/index.js:245:27) at Compilation.applyPluginsAsyncSeries (/Users/myUserName/dev-test/demo/node_modules/@angular/cli/node_modules/tapable/lib/Tapable.js:206:13) at sealPart2 (/Users/myUserName/dev-test/demo/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:653:9) at next (/Users/myUserName/dev-test/demo/node_modules/@angular/cli/node_modules/tapable/lib/Tapable.js:202:11) at Compilation.compilation.plugin (/Users/myUserName/dev-test/demo/node_modules/@angular/cli/node_modules/webpack/lib/ProgressPlugin.js:111:6) at next (/Users/myUserName/dev-test/demo/node_modules/@angular/cli/node_modules/tapable/lib/Tapable.js:204:14) at /Users/myUserName/dev-test/demo/node_modules/extract-text-webpack-plugin/dist/index.js:241:13 at /Users/myUserName/dev-test/demo/node_modules/async/dist/async.js:421:16 at iteratorCallback (/Users/myUserName/dev-test/demo/node_modules/async/dist/async.js:998:13) at /Users/myUserName/dev-test/demo/node_modules/async/dist/async.js:906:16 at /Users/myUserName/dev-test/demo/node_modules/extract-text-webpack-plugin/dist/index.js:224:15 at /Users/myUserName/dev-test/demo/node_modules/async/dist/async.js:421:16 at iteratorCallback (/Users/myUserName/dev-test/demo/node_modules/async/dist/async.js:998:13) at /Users/myUserName/dev-test/demo/node_modules/async/dist/async.js:906:16 at /Users/myUserName/dev-test/demo/node_modules/extract-text-webpack-plugin/dist/index.js:213:21 at rebuilding.forEach.cb (/Users/myUserName/dev-test/demo/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:521:29) at Array.forEach (native) at callback (/Users/myUserName/dev-test/demo/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:521:15) at processModuleDependencies (/Users/myUserName/dev-test/demo/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:540:5) at _combinedTickCallback (internal/process/next_tick.js:95:7)
角CLI版本等:
@angular/cli: 1.4.3
node: 8.0.0
os: darwin x64
@angular/animations: 4.4.3
@angular/cdk: 2.0.0-beta.11
@angular/common: 4.4.3
@angular/compiler: 4.4.3
@angular/core: 4.4.3
@angular/flex-layout: 2.0.0-beta.9-0e7d2e0
@angular/forms: 4.4.3
@angular/http: 4.4.3
@angular/material: 2.0.0-beta.11
@angular/platform-browser: 4.4.3
@angular/platform-browser-dynamic: 4.4.3
@angular/platform-server: 4.4.3
@angular/router: 4.4.3
@angular/cli: 1.4.3
@angular/compiler-cli: 4.4.3
typescript: 2.3.4
NPM版本:5.4.2
我'卡住,因爲我只是不能找出什麼是真的去了w^rong經過簡單的更新。
有什麼想法嗎?
我還運行 – Baconbeastnz
嘗試從'package.json'中刪除webpack運行'npm uninstall webpack --save-dev' –