0
У меня возникли проблемы с помощью командира: https://github.com/tj/commander.js/опции командир узла не определен
program
.command('school')
.arguments("<year>")
.option("--month <month>", "specify month")
.parse(process.argv)
.action(function (year) {
console.log(`the year is ${year} and the month is ${program.month}`);
});
Я не знаю, почему, но program.month
неопределен, даже когда я бегу с --month 12
.
Заранее спасибо.