Procedure to Upgrade the @vonage/cli application Procedure to Upgrade the @vonage/cli application

Procedure to Upgrade the @vonage/cli application

Vonage API Support

Objective

To upgrade the @vonage/cli (CLI to interact with Vonage APIs) application package

Applies To

  • Vonage API
  • Vonage CLI application

Procedure

  1. First, note down the version of @vonage/cli application by running vonage --version on the computer which has @vonage/cli application already installed. It may show the version as below:
    @vonage/cli/1.1.3 darwin-arm64 node-v18.0.0
  2. Now, go to Node JS Repository to check the latest version available. Suppose it shows the version as 1.1.4 (as of Jun. 14, 2022). Then, it indicates that the application of the computer needs to be updated.
  3. Run the following command to clear any cache:
    npm cache clean --force
  4. Then, run the following command to upgrade the package:
    sudo npm update -g @vonage/cli
    [NOTE: "sudo" command may ask the user to enter the computer password. Enter it to continue]
  5. The upgrade command, if successful, should throw the output similar as below:
    changed 8 packages, and audited 1327 packages in 4s
    112 packages are looking for funding
    run `npm fund` for details
    3 vulnerabilities (1 moderate, 2 critical)
    To address all issues, run:
    npm audit fix
    Run `npm audit` for details.
  6. To make sure that the @vonage/cli application is upgraded, run the vonage --version again and  see the output similar as below:
    @vonage/cli/1.1.4 darwin-arm64 node-v18.0.0