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

Arkit crash during running on medium size project #28

Open
davojta opened this issue Mar 13, 2019 · 11 comments
Open

Arkit crash during running on medium size project #28

davojta opened this issue Mar 13, 2019 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@davojta
Copy link

davojta commented Mar 13, 2019

Bug description

To Reproduce

  1. Operating system
    Ubuntu 16/04
  2. Arkit version and CLI arguments
    1.3.13
╰─$ node --version
v10.15.2

  1. Arkit config, if any was used
{
  "components": [
    {
      "type": "Dependency",
      "patterns": [
        "node_modules/*"
      ]
    },
    {
      "type": "Component",
      "patterns": [
        "**/*.ts",
        "**/*.js",
        "**/*.jsx",
        "**/*.tsx"
      ]
    }
  ],
  "excludePatterns": [
    "test",
    "tests",
    "dist",
    "coverage",
    "**/*.test.*",
    "**/*.spec.*",
    "**/*.min.*"
  ],
  "output": [
    {
      "path": [
        "svg"
      ],
      "groups": [
        {
          "first": true,
          "components": [
            "Component"
          ]
        },
        {
          "type": "Dependencies",
          "components": [
            "Dependency"
          ]
        }
      ]
    }
  ]
}

  1. Source code example, if it's possible
    I run on my project, so cant share it whole source base
@davojta davojta added the bug Something isn't working label Mar 13, 2019
@davojta davojta changed the title Arkit crash after Arkit crash during running on medium size project Mar 13, 2019
@davojta
Copy link
Author

davojta commented Mar 13, 2019

@dyatko
Copy link
Owner

dyatko commented Mar 13, 2019

@davojta Thanks for the bug report!
I've published some potential fixes in v1.3.14, please try again with logging.

@karevn
Copy link

karevn commented Mar 13, 2019

I've got a very similar issue with 1.3.14

https://gist.github.com/karevn/c0cda153fb233c74b38cd847fb4399e8

@dyatko
Copy link
Owner

dyatko commented Mar 13, 2019

@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?

@karevn
Copy link

karevn commented Mar 14, 2019

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.

@karevn
Copy link

karevn commented Apr 10, 2019

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)

@ghost
Copy link

ghost commented Mar 16, 2020

@karevn have you been able to resolve the issue? I have the same problem with both node10 and node13, btw I run on macOS

@woodgear
Copy link

woodgear commented Dec 8, 2020

same issue componentsByName[component.name].push is not a function,what should I do?

@busilina
Copy link

same here

Cleanshooter pushed a commit to Cleanshooter/arkit that referenced this issue Mar 2, 2021
@tevaum
Copy link

tevaum commented Sep 20, 2021

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

@lynoure
Copy link

lynoure commented May 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants