Skip to content
This repository has been archived by the owner on Dec 29, 2018. It is now read-only.

TypeError: Reduce of empty array with no initial value #124

Closed
mtrullasp opened this issue Jul 26, 2016 · 1 comment
Closed

TypeError: Reduce of empty array with no initial value #124

mtrullasp opened this issue Jul 26, 2016 · 1 comment

Comments

@mtrullasp
Copy link

With a big bundle file, I get this error:

$ monocle -c index.html -b dist/bundle.js
Starting to strip comments from bundle file...
Took 81.673 seconds to strip comments input bundle file
c:\Users\inf011\AppData\Roaming\npm\node_modules\react-monocle\src\previewParser
.js:162
.reduce((prev, curr) => {
^

TypeError: Reduce of empty array with no initial value
at Array.reduce (native)
at getComponentName (c:\Users\inf011\AppData\Roaming\npm\node_modules\react-
monocle\src\previewParser.js:162:5)
at Object.modifySetStateStrings (c:\Users\inf011\AppData\Roaming\npm\node_mo
dules\react-monocle\src\previewParser.js:231:35)
at c:\Users\inf011\AppData\Roaming\npm\node_modules\react-monocle\bin\cmd.js
:41:38
at Object. (c:\Users\inf011\AppData\Roaming\npm\node_modules\reac
t-monocle\bin\cmd.js:57:3)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)

@mbchoa
Copy link
Member

mbchoa commented Jul 27, 2016

Hey! Thank you for the feedback.

We will be closing this and using #119 as the main thread for this issue.

@mbchoa mbchoa closed this as completed Jul 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants