IonicaBizau / git-stats

🍀 Local git statistics including GitHub-like contributions calendars.
MIT License
6.41k stars 183 forks source link

TypeError: Cannot supply flags when constructing one RegExp from another #152

Closed satur9nine closed 5 years ago

satur9nine commented 5 years ago
Linux 4.15.0-54-generic
node v4.2.6
npm  v3.5.2

git-stats --help
/usr/local/lib/node_modules/git-stats/node_modules/remove-blank-lines/lib/index.js:10
var blankLines = new RegExp(/(^[ \t]*\n)/, "gm");
                 ^

TypeError: Cannot supply flags when constructing one RegExp from another
    at new RegExp (native)
    at Object.<anonymous> (/usr/local/lib/node_modules/git-stats/node_modules/remove-blank-lines/lib/index.js:10:18)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/git-stats/node_modules/tilda/lib/index.js:24:24)
    at Module._compile (module.js:410:26)
satur9nine commented 5 years ago

Problem is too old version of node. Just upgrade node to something recent like 10+.