botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

'npm' is not recognized as an internal or external command

Open lvmmth opened this issue 8 years ago • 10 comments

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.

lvmmth avatar Mar 08 '18 07:03 lvmmth

Please try restarting the website itself.

EricDahlvang avatar Mar 08 '18 07:03 EricDahlvang

@EricDahlvang

I have restarted the app and the website, also signed out and signed in back. But it happened the same.

lvmmth avatar Mar 08 '18 08:03 lvmmth

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.

stevengum avatar Mar 08 '18 20:03 stevengum

@stevengum97 Thank you very much! Now I can work on DebugConsole.

lvmmth avatar Mar 09 '18 02:03 lvmmth

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 avatar Jun 03 '18 06:06 rwifall

@rwifall Yes, sometimes the error still occurs. @stevengum97 has provided a valid workaround.

EricDahlvang avatar Jun 04 '18 20:06 EricDahlvang

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

VanessaOrtiz30 avatar Aug 14 '18 19:08 VanessaOrtiz30

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>

patpishiva avatar Sep 12 '18 23:09 patpishiva

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.

upsilondynamics avatar Sep 27 '18 20:09 upsilondynamics

still exist in the Visual Studio Online

ceteongvanness avatar Oct 06 '18 13:10 ceteongvanness