Welcome to the Linux Foundation Forum!

Building CLI Tools / Styling the Output Messages (4)

Are the imports from ./displays.js missing in the code examples for my-cli/src/utils.js at https://trainingportal.linuxfoundation.org/learn/course/introduction-to-nodejs-lfw111x/building-cli-tools/customizing-the-terminal-user-interface?page=5 ?

It seems that this line should be added at the top of utils.js:
import { displayAmount, displayID, displayInfo, displaySuccess, displayText, displayTimestamp } from "./displays.js";

Also, the command to be run on the same page should apparently be
my-cli update A1 30
instead of
my-cli list A1 30.
Otherwise, you will get Error: Invalid category specified.

Categories

Upcoming Training