'npm' is not recognized as an internal or external command
When I run Build.cmd, It said:
Installing Kudu Sync An error has occurred during web site deployment. 'npm' is not recognized as an internal or external command, operable program or batch file.
I have added some source code in EchoDialog.cs but it failed, then I remove them out and re-run Build.cmd again. But I got the error above! I'm sure that I didn't remove more, because it just a few code.
Thank you in advance. Joy.
Please try restarting the website itself.
@EricDahlvang
I have restarted the app and the website, also signed out and signed in back. But it happened the same.
You'll want to navigate to <the-name-of-your-resource>.scm.azurewebsites.net/DebugConsole:
Then navigate to D:\home\site\wwwroot:

From here you can run the build.cmd:
There's a weird bug being investigated where calling build.cmd from the online code editor doesn't work and throws the error you ran into above. Oddly enough though, typing npm --version in the code editor's console will show that npm is indeed detected as the version number will be returned.
@stevengum97 Thank you very much! Now I can work on DebugConsole.
You still get this error when following the instructions below, so either the documentation should be fixed, or this bug should be fixed.
@rwifall Yes, sometimes the error still occurs. @stevengum97 has provided a valid workaround.
This was from a comment I found online (thank you robertalexandrov from msdn) it really helped me; I just added onto it as to what I wish it had....
I solved this by clicking into your “open online editor”, and at the top bar (next to app service editor) click on you bots name/title, and then given the drop down menu select "Open Kudu Console". Make sure you’re in browser it says the-name-of-your-resource-or-title.scm.azurewebsites.net/DebugConsole Then on the “old console” do: cd site cd wwwroot ./build.cmd
Microsoft should do a better job of making this clear. *I hope this helps someone else
i am getting intermittent error while deploy.cmd D:\home\site\wwwroot>build.cmd Handling .NET Web Application deployment. MSBuild auto-detection: using msbuild version '14.0' from 'D:\Program Files (x86)\MSBuild\14.0\bin\amd64'. All packages listed in packages.config are already installed. Microsoft.Bot.Sample.SimpleEchoBot -> D:\home\site\wwwroot\bin\SimpleEchoBot.dll Finished successfully. D:\home\site\wwwroot>deploy.cmd Handling .NET Web Application deployment. Input file does not exist: D:\home\Microsoft.Bot.Sample.SimpleEchoBot.sln. Failed exitCode=1, command=nuget restore "D:\home\Microsoft.Bot.Sample.SimpleEchoBot.sln" An error has occurred during web site deployment.
D:\home\site\wwwroot>
I'm also dealing with this problem, out of the box build.cmd script doesn't work for online code editing/rebuilding??? What the heck Microsoft.. Does anyone know what a fix is for this? I believe I can deploy from Visual Studio but, can't build directly from Azure...
KuduSync.NET from: 'D:\local\Temp___deployTemp9033' to: 'D:\home\site\wwwroot' Copying file: 'BasicBot.deps.json' Copying file: 'BasicBot.dll' Copying file: 'BasicBot.pdb' Copying file: 'BasicBot.PrecompiledViews.dll' Copying file: 'BasicBot.PrecompiledViews.pdb' Copying file: 'BasicBot.runtimeconfig.json' Error: Could not find a part of the path 'D:\home\site\artifacts\manifest'. Failed exitCode=1, command="kudusync" -v 50 -f "D:\local\Temp___deployTemp9033" -t "D:\home\site\wwwroot." -n "D:\home\site\wwwroot..\artifacts\manifest" -p "D:\home\site\wwwroot..\artifacts\manifest" -i ".git;.hg;.deployment;deploy.cmd" An error has occurred during web site deployment.
still exist in the Visual Studio Online