Open davojta opened 5 years ago
@davojta Thanks for the bug report! I've published some potential fixes in v1.3.14, please try again with logging.
I've got a very similar issue with 1.3.14
https://gist.github.com/karevn/c0cda153fb233c74b38cd847fb4399e8
@karevn actually, it's a bit different and I suspect it's related to Node version. Could you please update arkit to 1.3.16 and try again?
I've upgraded to 1.3.17, exactly the same error. Node.js version 8.11.2, and upgrading it is not an option in the meantime.
Still have the same issue on 1.5.3
TypeError: componentsByName[component.name].push is not a function
at Generator.resolveConflictingComponentNames (/Users/v8cult/src/corp-client/node_modules/arkit/dist/generator.js:124:46)
at Generator.generate (/Users/v8cult/src/corp-client/node_modules/arkit/dist/generator.js:13:59)
at Promise.all.outputs.reduce (/Users/v8cult/src/corp-client/node_modules/arkit/dist/arkit.js:46:34)
at Array.reduce (<anonymous>)
at exports.getOutputs (/Users/v8cult/src/corp-client/node_modules/arkit/dist/arkit.js:45:32)
at Object.<anonymous> (/Users/v8cult/src/corp-client/node_modules/arkit/index.js:23:3)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
@karevn have you been able to resolve the issue? I have the same problem with both node10 and node13, btw I run on macOS
same issue componentsByName[component.name].push is not a function
,what should I do?
same here
Hi all. I was having this issue too and I did some investigation. The thing is there are some libraries that use some reserved JS properties as the filename. In my case, the filenames causing the error were constructor.js
, toString.js
and valueOf.js
, which were converted to constructor
, toString
and valueOf
.
I just created a PR (#710) to fix this issue.
cc: @dyatko
In my case today, the problematic files were from lodash. I could work around it by excluding those directories too, but I only found the culprit after debugging. I imagine many people are using Arkit to get a better understanding of a legacy code base, so it might make things much much easier to have more robust handling of the names.
Bug description
To Reproduce