Nixinova / LinguistJS

Analyse and list all languages used in a folder. Implementation of and powered by GitHub's Linguist.
ISC License
39 stars 12 forks source link

Bug: Cannot read properties of undefined #27

Closed drodil closed 8 months ago

drodil commented 8 months ago

Running linguist-js fails for some repositories with the following error:

/home/.nvm/versions/node/v18.15.0/lib/node_modules/linguist-js/dist/index.js:180
        const finalResult = !opts.childLanguages && result && langData[result].group || result;
                                                                               ^

TypeError: Cannot read properties of undefined (reading 'group')
    at addResult (/home/.nvm/versions/node/v18.15.0/lib/node_modules/linguist-js/dist/index.js:180:80)
    at analyse (/home/.nvm/versions/node/v18.15.0/lib/node_modules/linguist-js/dist/index.js:240:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /home/.nvm/versions/node/v18.15.0/lib/node_modules/linguist-js/dist/cli.js:55:22

Node.js v18.15.0