Bot service does not work with Node.js. Error cannot find module 'botbuilder'

I created the bot service through the "Azure Portal" with Node.js and LUIS. When the bot is created, I can forever see the loading of the chat interface with the message "Loading chat interface". Bot Developer Interface

So, I opened Bot through "My bots" on "dev.botframework.com" and tested the connection. Error with error below. Chat window

When I pinged "Hello" in the chat window, I could see an error in log exclusion when executing the function: Functions.messages. mscorlib: Error: cannot find module 'botbuilder'

I could see the dependency "botbuildr" in "package.json" as shown below.

{ "name": "luisbot", "version": "1.0.0", "description": "", "main": "index.js", "dependencies": { "botbuilder": "^3.7.0", "botbuilder-azure": "3.0.2" }, "devDependencies": { "restify": "^4.3.0" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" } 

Any suggestions for error?

+6
source share
2 answers

I had the same problem and it was solved by running npm install in the kudu console.

Go to your -bab Settings bot service and click to open Advanced Settings . There you can find " Advanced Tools " (kudu) in the Development Tools section. Open the Debug Console and cd to the folder where you have package.json (for me it was D: \ home \ site \ wwwroot \ messages) and run npm install .

After that, you can chat with the bot at dev.botframework.com , although the chat interface will not work on the Azure portal.

+13
source

Firstly, I applied npm install, after a dependency error (botbuilder-azure) occurred, I added the dependency to the json package, and it worked.

0
source

Source: https://habr.com/ru/post/1266998/


All Articles