nfroidure/svgicons2svgfont

Get "program.args.flatMap is not a function" error when using CLI command on windows 10

Closed this issue · 3 comments

Issue

Same on mac:

svgicons2svgfont --fontname=hello -o font.svg svgs/*.svg
/usr/local/lib/node_modules/svgicons2svgfont/bin/svgicons2svgfont.js:68
const files = program.args.flatMap(file => glob.sync(file));
                           ^

TypeError: program.args.flatMap is not a function
    at Object.<anonymous> (/usr/local/lib/node_modules/svgicons2svgfont/bin/svgicons2svgfont.js:68:28)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
node --version
v10.16.0

Looks like it works with latest node v12
Easy to install with n

n latest

@nfroidure you can close this