Cognigy / Cognigy-CLI

Cognigy-CLI is a series of tools meant to aid Cognigy.AI developers in maintaining local copies of their virtual agent projects.
Other
7 stars 6 forks source link

Errors with cognigy diff: "chalk.green is not a function" #147

Closed dlukes closed 6 months ago

dlukes commented 9 months ago

When trying to run cognigy diff, I get errors instead of diff output. The errors are similar to the second one reported in #146.

E.g. when trying to diff a flow, the output is:

/Users/david/.local/mambaforge/envs/umrk/lib/node_modules/@cognigy/cognigy-cli/build/lib/flows.js:204
    const spinner = new cli_spinner_1.Spinner(`Comparing ${chalk.green('local')} and ${chalk.red('remote')} Flow resource ${chalk.blueBright(flowName)}... %s`);
                                                                 ^

TypeError: chalk.green is not a function
    at diffFlows (/Users/david/.local/mambaforge/envs/umrk/lib/node_modules/@cognigy/cognigy-cli/build/lib/flows.js:204:66)
    at diff (/Users/david/.local/mambaforge/envs/umrk/lib/node_modules/@cognigy/cognigy-cli/build/commands/diff.js:13:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Command.<anonymous> (/Users/david/.local/mambaforge/envs/umrk/lib/node_modules/@cognigy/cognigy-cli/build/program/program.js:53:59)

Node.js v20.8.0

Or when trying to diff a lexicon, the output is:

chalk.green is not a function
XavierJordaMurria commented 9 months ago

Hi dlukes, thanks for reporting this. we will create an internal investigation ticket

dlukes commented 6 months ago

This has probably been fixed by https://github.com/Cognigy/Cognigy-CLI/commit/2679b1e98776baed322dc3210617ccc3ec7dc144?

XavierJordaMurria commented 6 months ago

yes, this should be fixed there. Please update your CognigyCLI to v1.5.0