First I run npm install -g vsts-npm-auth command and I get a message that [email protected] 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
Try to: 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. 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
.
For Visual Studio (VS) Code try killing and restarting the terminal session and running again.
Image: VS Code terminal trash icon
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With