简体   繁体   English

vsts-npm-auth 未被识别为 cmdlet 的名称

[英]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

  • vsts-npm-auth -config .npmrc vsts-npm-auth -config .npmrc
  •  + 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) 代码,尝试终止并重新启动终端会话并再次运行。

Image: VS Code terminal trash icon图片:VS Code 终端垃圾桶图标

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用新的用户名和密码更新 vsts-npm-auth - Update vsts-npm-auth with new username and password 'ng' 未被识别为 cmdlet 的名称 - 'ng' is not recognized as the name of a cmdlet Nodemon 未被识别为 cmdlet 的名称 - Nodemon is not recognized as a name of a cmdlet const 未被识别为 cmdlet 的名称 - Const not recognized as the name of a cmdlet 术语“ New-AzureServiceProject”未被识别为cmdlet的名称 - The term 'New-AzureServiceProject' is not recognized as the name of a cmdlet 术语“gulp”未被识别为cmdlet错误的名称 - The term 'gulp' is not recognized as the name of a cmdlet error 消息“术语‘ng’未被识别为 cmdlet 的名称” - Message "the term 'ng' is not recognized as the name of a cmdlet" VSCode 终端:术语“节点”未被识别为 cmdlet 的名称 - VSCode Terminal: The term 'node' is not recognized as the name of a cmdlet nexe:术语“nexe”未被识别为 cmdlet、function、脚本文件或可操作的名称 - nexe : The term 'nexe' is not recognized as the name of a cmdlet, function, script file, or operable 术语“nodemon”未被识别为 cmdlet、function、脚本文件或可运行程序的名称 - The term 'nodemon' is not recognized as the name of a cmdlet, function, script file, or operable program
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM