Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prod build fails with TypeError: Reduce of empty array with no initial value #377

Closed
jkyoutsey opened this issue Mar 2, 2016 · 2 comments

Comments

@jkyoutsey
Copy link

I don't have any empty arrays anywhere in my ts modules that I can find.

`> webpack --config webpack.prod.config.js --progress --profile --colors --display-error-details --display-cached

532ms build modules
1ms seal
1ms optimize
75% hashingUnhandled rejection TypeError: Reduce of empty array with no initial value
at Array.reduce (native)
at Compilation. (/Users/JARVIS/src/project7/node_modules/webpack-md5-hash/plugin/webpack_md5_hash.js:27:82)
at Compilation.applyPlugins (/Users/JARVIS/src/project7/node_modules/tapable/lib/Tapable.js:26:37)
at Compilation.createHash (/Users/JARVIS/src/project7/node_modules/webpack/lib/Compilation.js:791:8)
at Compilation. (/Users/JARVIS/src/project7/node_modules/webpack/lib/Compilation.js:554:8)
at Compilation.applyPluginsAsync (/Users/JARVIS/src/project7/node_modules/tapable/lib/Tapable.js:60:69)
at Compilation.seal (/Users/JARVIS/src/project7/node_modules/webpack/lib/Compilation.js:525:7)
at Compiler. (/Users/JARVIS/src/project7/node_modules/webpack/lib/Compiler.js:397:15)
at /Users/JARVIS/src/project7/node_modules/tapable/lib/Tapable.js:103:11
at /Users/JARVIS/src/project7/node_modules/html-webpack-plugin/index.js:50:9
at tryCatcher (/Users/JARVIS/src/project7/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/JARVIS/src/project7/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/promise.js:503:31)
at Promise._settlePromise (/Users/JARVIS/src/project7/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/promise.js:560:18)
at Promise._settlePromise0 (/Users/JARVIS/src/project7/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/promise.js:605:10)
at Promise._settlePromises (/Users/JARVIS/src/project7/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/promise.js:684:18)
at Async._drainQueue (/Users/JARVIS/src/project7/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/async.js:126:16)
at Async._drainQueues (/Users/JARVIS/src/project7/node_modules/html-webpack-plugin/node_modules/bluebird/js/release/async.js:136:10)
at Immediate.Async.drainQueues as _onImmediate
at processImmediate as _immediateCallback`

@sasidhar
Copy link

sasidhar commented Mar 7, 2016

@jkyoutsey It seems, this issue is already discussed in #215 (comment)

There was some issue with the webpack-md5-hash when there are some empty files. Refer : erm0l0v/webpack-md5-hash#1

This was already fixed with the latest version of webpack-md5-hash

Can you try updating webpack-md5-hash with the latest version and see if this issue still exists?

@jkyoutsey
Copy link
Author

Agreed. I upgraded somewhere along the way and forgot I put this out there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants