First I run npm install -g vsts-npm-auth command and I get a message that vsts-npm-auth@0.41.0 installed. But then when I'm running vsts-npm-auth -config .npmrc command I get the following error message:
vsts-npm-auth : The term 'vsts-npm-auth' 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
+ CategoryInfo : ObjectNotFound: (vsts-npm-auth:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
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. It's likely that the npm modules folder is not in your PATH.
Please run below command to append your npm module folder into PATH
:
setx path "%APPDATA%\npm;%path%"
Then you should be able to execute vsts-npm-auth -config .npmrc
.