Welcome to the Linux Foundation Forum!

ReferenceError: add is not defined - Working with CLI Tools

When completing the Working with CLI Tools lesson remember to update the imported function names in cmd.js

import {update, **add**} from "../src/utils.js";

This instruction is missing from the lesson. The following error will occur when trying to add products from the command line:

  1. PS C:\Users\...\my-cli> my-cli add electronics A3 Laptop 599 "Best mid-priced laptop money can buy"
  2. ...
  3. await add(category, id, name, amount, info)
  4. ^
  5.  
  6. ReferenceError: add is not defined
  7. ...

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training