[英]vsts-npm-auth is not recognized as the name of a cmdlet
First I run npm install -g vsts-npm-auth command and I get a message that vsts-npm-auth@0.41.0 installed.首先我运行npm install -g vsts-npm-auth命令,我收到一条消息,安装了 vsts-npm-auth@0.41.0。 But then when I'm running vsts-npm-auth -config .npmrc command I get the following error message:
但是当我运行 vsts-npm-auth -config .npmrc 命令时,我收到以下错误消息:
vsts-npm-auth : The term 'vsts-npm-auth' is not recognized as the name of a cmdlet, function, script file, or operable program. vsts-npm-auth :术语“vsts-npm-auth”不被识别为 cmdlet、函数、脚本文件或可运行程序的名称。 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
在行:1 字符:1
+ CategoryInfo : ObjectNotFound: (vsts-npm-auth:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
尝试: npx vsts-npm-auth -config .npmrc
Since you mentioned the package vsts-npm-auth
has been installed successfully, but still encountered the "The term 'vsts-npm-auth' is not recognized" error.由于您提到软件包
vsts-npm-auth
已成功安装,但仍然遇到“无法识别术语‘vsts-npm-auth’”错误。 It's likely that the npm modules folder is not in your PATH . npm modules 文件夹很可能不在您的PATH 中。
Please run below command to append your npm module folder into PATH
:请运行以下命令将您的npm 模块文件夹附加到
PATH
:
setx path "%APPDATA%\npm;%path%"
Then you should be able to execute vsts-npm-auth -config .npmrc
.然后你应该能够执行
vsts-npm-auth -config .npmrc
。
For Visual Studio (VS) Code try killing and restarting the terminal session and running again.对于 Visual Studio (VS) 代码,尝试终止并重新启动终端会话并再次运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.