Botframework-sdk: 'npm' is not recognized as an internal or external command

Created on 8 Mar 2018  Â·  10Comments  Â·  Source: microsoft/botframework-sdk

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.

Most helpful comment

You'll want to navigate to <the-name-of-your-resource>.scm.azurewebsites.net/DebugConsole:

1st


Then navigate to D:\home\site\wwwroot:

2nd


From here you can run the build.cmd:

3rd

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.

All 10 comments

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:

1st


Then navigate to D:\home\site\wwwroot:

2nd


From here you can run the build.cmd:

3rd

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.

https://docs.microsoft.com/en-us/azure/bot-service/dotnet/bot-builder-dotnet-luis-dialogs?view=azure-bot-service-3.0

@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:homesitewwwroot>build.cmd
Handling .NET Web Application deployment.
MSBuild auto-detection: using msbuild version '14.0' from 'D:Program Files (x86)MSBuild14.0binamd64'.
All packages listed in packages.config are already installed.
Microsoft.Bot.Sample.SimpleEchoBot -> D:homesitewwwrootbinSimpleEchoBot.dll
Finished successfully.
D:homesitewwwroot>deploy.cmd
Handling .NET Web Application deployment.
Input file does not exist: D:homeMicrosoft.Bot.Sample.SimpleEchoBot.sln.
Failed exitCode=1, command=nuget restore "D:homeMicrosoft.Bot.Sample.SimpleEchoBot.sln"
An error has occurred during web site deployment.

D:homesitewwwroot>

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:localTemp___deployTemp9033' to: 'D:homesitewwwroot'
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:homesiteartifactsmanifest'.
Failed exitCode=1, command="kudusync" -v 50 -f "D:localTemp___deployTemp9033" -t "D:homesitewwwroot." -n "D:homesitewwwroot..artifactsmanifest" -p "D:homesitewwwroot..artifactsmanifest" -i ".git;.hg;.deployment;deploy.cmd"
An error has occurred during web site deployment.

still exist in the Visual Studio Online

Was this page helpful?
0 / 5 - 0 ratings