在Windows操作系统上安装Vercel CLI时遇到问题

4
我已经全局安装了Vercel,但是每当我在终端中输入vercel loginvercel命令时,会显示以下错误。我已经在Google上搜索了这个问题,但没有找到解决方案。
 vercel : The term 'vercel' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if 
    a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + vercel login
    + ~~~~~~
        + CategoryInfo          : ObjectNotFound: (vercel:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
1个回答

0

当我尝试使用yarn安装vercel CLI时,遇到了这个确切的问题。 发布此帖子是为了让其他人节省时间。

尝试通过Visual Code和powershell运行它。 尝试以vercel@latest全局运行它

真正起作用的是: 在已启用管理员权限的powershell中使用npm install -g vercel。

(在这种情况下,Yarn仍然无法工作) 我也不在基础目录中

为什么?老实说,我不确定。 我只是想发布此帖子,以希望能为他人节省时间。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接