[Fixed] Cannot read properties of undefined (reading ‘getAnswers’)

I get this error when I connected Microsoft Bot Framework Node.js SDK with Language Studio Custom Question Answering. I created a new bot with ‘yo’ builder.

New Node.js bot do not have latest Microsoft Bot Framework SDK version. They point to version 4.15.0. To get rid of this error, upgrade the version to 4.17.0 in package.json for all bot builder npm packages.

"botbuilder": "~4.17.0",
"botbuilder-ai": "~4.17.0",
"botbuilder-dialogs": "~4.17.0",

Once you change the version number in package.json, re run the below command in the terminal.

npm install

Up ↑

%d bloggers like this: