如何在通过npm下载的mac上卸载cli工具

x4shl7ld  于 2023-05-29  发布在  Mac
关注(0)|答案(1)|浏览(176)

我最初使用npm install --global cdktf-cli@latest在我的mac上安装了cdktf cli。我现在想卸载cdktf cli,但即使在我运行`npm uninstall --global @cdktf-cli@latest```并获得以下输出之后:

npm uninstall --global @cdktf-cli@latest

up to date, audited 1 package in 125ms

found 0 vulnerabilities

,然后运行cdktf --help,我仍然得到以下输出,显示工具仍然安装:

cdktf --help
cdktf

Commands:
  cdktf init                Create a new cdktf project from a template.
  cdktf get                 Generate CDK Constructs for Terraform providers and
                            modules.
  cdktf convert             Converts a single file of HCL configuration to CDK
                            for Terraform. Takes the file to be converted on
                            stdin.
  cdktf deploy [stacks...]  Deploy the given stacks             [aliases: apply]
  cdktf destroy [stacks..]  Destroy the given stacks
  cdktf diff [stack]        Perform a diff (terraform plan) for the given stack
                                                                 [aliases: plan]
  cdktf list                List stacks in app.
  cdktf login               Retrieves an API token to connect to Terraform Cloud
                            or Terraform Enterprise.
  cdktf synth               Synthesizes Terraform code for the given app in a
                            directory.                     [aliases: synthesize]
  cdktf watch [stacks..]    [experimental] Watch for file changes and
                            automatically trigger a deploy
  cdktf output [stacks..]   Prints the output of stacks       [aliases: outputs]
  cdktf debug               Get debug information about the current project and
                            environment
  cdktf provider            A set of subcommands that facilitates provider
                            management
  cdktf completion          generate completion script

Options:
      --version                   Show version number                  [boolean]
      --disable-plugin-cache-env  Dont set TF_PLUGIN_CACHE_DIR automatically.
                                  This is useful when the plugin cache is
                                  configured differently. Supported using the
                                  env CDKTF_DISABLE_PLUGIN_CACHE_ENV.
                                                      [boolean] [default: false]
      --log-level                 Which log level should be written. Only
                                  supported via setting the env CDKTF_LOG_LEVEL
                                                                        [string]
  -h, --help                      Show help                            [boolean]

Options can be specified via environment variables with the "CDKTF_" prefix
(e.g. "CDKTF_OUTPUT")

有没有人知道我如何才能删除cdktf cli为好,这样当我试图运行cdktf --help我会得到类似“没有工具发现”的东西。

bzzcjhmw

bzzcjhmw1#

npm uninstall -g cdktf-cli

我也遇到了同样的问题,但不知何故,这个命令将从您的机器上卸载全局cdktf-cli

相关问题