The term 'msbot' is not recognized as the name of a cmdlet, function, script file, or operable program

落花浮王杯 提交于 2019-12-24 07:49:35

问题


Even after running "npm install -g msbot", I still see msbot : The term 'msbot' 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 when tring to clear existing secrets and decrypt use this:

msbot secret -b my.bot --secret OLDSECRET --clear


回答1:


This could be caused by a few things. Here's a few troubleshooting steps you can try:

  1. If your console is running inside of Visual Studio or VS Code, try running it from a normal console.
  2. If you just installed msbot, you may need to close and re-open your console.
  3. Ensure that your npm folder has been added to your Environment Variables.See "Adding Environment Variables" below.
  4. If you already have the PATH variable added from step 3, you may need to move that entry to ensure it is above/before your Node install path (%ProgramFiles%\nodejs\)

Adding Environment Variable

  1. Start Menu > Type "environment variables" and hit Enter

  1. Click Environment Variables

  1. Double-click Path

  1. Ensure C:\Users\<YourUserName>\AppData\Roaming\npm (or your npm install path) has been added to your PATH variable. You may need to restart your computer for this to take effect.



来源:https://stackoverflow.com/questions/55007252/the-term-msbot-is-not-recognized-as-the-name-of-a-cmdlet-function-script-fil

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!