You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked into the CLI part of style-dictonary to construct a similar thing and I found a bug when I run the command style-dictionary test or npx -p style-dictionary style-dictionary test in my case:
npx : 43 installé(s) en 3.911s
/Users/xzalawa/.npm/_npx/19473/lib/node_modules/style-dictionary/bin/style-dictionary:75
console.error('Invalid command: %s\nSee --help for a list of available commands.', args.join(' '));
^
ReferenceError: args is not defined
at Command.<anonymous> (/Users/xzalawa/.npm/_npx/19473/lib/node_modules/style-dictionary/bin/style-dictionary:75:86)
at Command.emit (events.js:400:28)
at Command._parseCommand (/Users/xzalawa/.npm/_npx/19473/lib/node_modules/style-dictionary/node_modules/commander/index.js:920:16)
at Command.parse (/Users/xzalawa/.npm/_npx/19473/lib/node_modules/style-dictionary/node_modules/commander/index.js:717:10)
at Object.<anonymous> (/Users/xzalawa/.npm/_npx/19473/lib/node_modules/style-dictionary/bin/style-dictionary:111:9)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
I read the documentation of the commander.js package and it seems that we should use operands instead of args like this (cf.: Custom event listeners):
// error on unknown commands
program.on('command:*', function (operands) {
console.error('Invalid command: %s\nSee --help for a list of available commands.', operands.join(' '));
process.exit(1);
});
The text was updated successfully, but these errors were encountered:
Thanks for filing this issue @7studio ! It looks like there are actually 2 issues:
There is no test command
In the catch-all bucket for the CLI there is an error because as you pointed out args is not defined. @chazzmoney and I looked at this yesterday and we think we have a fix for it.
Hi,
I looked into the CLI part of style-dictonary to construct a similar thing and I found a bug when I run the command
style-dictionary test
ornpx -p style-dictionary style-dictionary test
in my case:I read the documentation of the commander.js package and it seems that we should use
operands
instead ofargs
like this (cf.: Custom event listeners):The text was updated successfully, but these errors were encountered: