【问题标题】:Installing the Vercel CLI in Visual Studio Code在 Visual Studio Code 中安装 Vercel CLI
【发布时间】:2021-01-23 20:50:02
【问题描述】:

我已使用我的 Github 帐户登录 Vercel。

我在 Visual Studio Code 中运行命令 npm install -g vercel(在相关项目目录中),它安装成功,但是当我运行“vercel”或“vercel login”时,它给了我错误:

*vercel : 术语“vercel”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查拼写 名称,或者如果包含路径,请验证路径是否正确并 再试一次。在 line:1 char:1

  • vercel 登录
  •   + CategoryInfo          : ObjectNotFound: (vercel:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException*
    

任何建议将不胜感激! 谢谢

【问题讨论】:

标签: visual-studio-code vercel


【解决方案1】:

您的 PowerShell 不知道 vercel 所在的路径。要运行 vercel 脚本,您必须手动安装或运行 Powershell 的 .ps1 脚本。

使用 PowerShell 运行此脚本:C:\Users\YourUserName\AppData\Roaming\npm\vercel.ps1

【讨论】:

    猜你喜欢
    • 2017-04-02
    • 1970-01-01
    • 1970-01-01
    • 2022-11-29
    • 2018-11-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多