flosse / sloc

simple tool to count SLOC (source lines of code)
MIT License
943 stars 84 forks source link

Sloc error with newest docker-node container #130

Open konfuzzyus-ger opened 2 years ago

konfuzzyus-ger commented 2 years ago

After a docker node update sloc seems to have the following problem:

$ sloc --details --format cli-table --keys total,source,comment js/*.js
/usr/local/lib/node_modules/sloc/node_modules/cli-table/lib/utils.js:85
  var split = stripped.split("\n");
                       ^
TypeError: stripped.split is not a function
    at Object.exports.strlen (/usr/local/lib/node_modules/sloc/node_modules/cli-table/lib/utils.js:85:24)
    at get_width (/usr/local/lib/node_modules/sloc/node_modules/cli-table/lib/index.js:138:70)
    at /usr/local/lib/node_modules/sloc/node_modules/cli-table/lib/index.js:131:68
    at Array.forEach (<anonymous>)
    at extractColumnWidths (/usr/local/lib/node_modules/sloc/node_modules/cli-table/lib/index.js:130:9)
    at /usr/local/lib/node_modules/sloc/node_modules/cli-table/lib/index.js:104:11
    at Array.forEach (<anonymous>)
    at Table.toString (/usr/local/lib/node_modules/sloc/node_modules/cli-table/lib/index.js:101:16)
    at module.exports (/usr/local/lib/node_modules/sloc/lib/formatters/cli-table.js:56:18)
    at print (/usr/local/lib/node_modules/sloc/lib/cli.js:95:11)
Node.js v17.0.1