I have create-react-project v15 and run npm run build and takes long time (20mins)(like freezing) for running build then got this error result.
How to Fix this?
enter code heresers/rice/my-app-2/node_modules/extract-text-webpack-plugin/dist/index.js:246
if (extractedChunk.getNumberOfModules()) {
^
TypeError: extractedChunk.getNumberOfModules is nota function
at ExtractTextPlugin.<anonymous> (/Users/rice/my-app-2/node_modules/extract-text-webpack-plugin/dist/index.js:246:32)
at Array.forEach (<anonymous>)
at Compilation.<anonymous> (/Users/rice/my-app-2/node_modules/extract-text-webpack-plugin/dist/index.js:245:27)
at Compilation.applyPluginsAsyncSeries (/Users/rice/my-app-2/node_modules/react-scripts/node_modules/tapable/lib/Tapable.js:206:13)
at sealPart2 (/Users/rice/my-app-2/node_modules/react-scripts/node_modules/webpack/lib/Compilation.js:636:9)
at next (/Users/rice/my-app-2/node_modules/react-scripts/node_modules/tapable/lib/Tapable.js:202:11)
at /Users/rice/my-app-2/node_modules/extract-text-webpack-plugin/dist/index.js:241:13
at /Users/rice/my-app-2/node_modules/async/dist/async.js:421:16
at iteratorCallback (/Users/rice/my-app-2/node_modules/async/dist/async.js:998:13)
at /Users/rice/my-app-2/node_modules/async/dist/async.js:906:16
at /Users/rice/my-app-2/node_modules/extract-text-webpack-plugin/dist/index.js:224:15
at /Users/rice/my-app-2/node_modules/async/dist/async.js:421:16
at iteratorCallback (/Users/rice/my-app-2/node_modules/async/dist/async.js:998:13)
at /Users/rice/my-app-2/node_modules/async/dist/async.js:906:16
at /Users/rice/my-app-2/node_modules/extract-text-webpack-plugin/dist/index.js:213:21
at rebuilding.forEach.cb (/Users/rice/my-app-2/node_modules/react-scripts/node_modules/webpack/lib/Compilation.js:504:29)
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c react-scripts build
Directory: /Users/rice/my-app-2
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/rice/my-app-2/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.