I am developing Microsoft azure QnA Maker Bot with javascript. I have added questions in knowledge based of qnamaker.io. i have created javascript project with botbuilder and create .bot file for adding services like,
{ "name":"qna-bot-v4", "services": [ { "type":"endpoint", "name":"development", "endpoint":"http://localhost:3978/api/messages", "appId":"", "appPassword":"", "id":"1" }, { "type":"qna", "name":"xxx-test-kb", "kbId":"d7e734bc-6e1b-499c-80bc-42eb6db2fb3d", "hostname":"https://xxx-qna-service.cognitiveservices.azure.com/", "endpointKey": "78511920-63b0-4437-8a7e-9bafbac54ac3", "subscriptionKey":"1c44011f-1da7-4239-bd15-5be74bbfc664", "id":"123" } ], "padlock":"", "version":"2.0" }
I have updated index.js file with botbuilderconfigurations and botbuilder-config and set the path of botfile with .env file. When i run the index.js file with command node index.js then i'm getting following error.
Error reading bot file. please ensure you have valid botFilePath
Consider printing the error in the try... catch block in index.js, where you're loading the Bot Configuration. console.error(err), for example. It's possible that you're experiencing a different type of error than the one stated in the error message.
Also please refer to this similar SO thread.