Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
Getting Error "Error reading bot file. please ensure you have valid botFilePath" in Microsoft azure QnA Maker Bot Javascript file

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

  • The botFileSecret is availble under appsetting for your azure bot
  • If you are running this bot locally, consider adding a new .env file see https://aka.ms/about-bot-file to learn more about .bot file D:\user\Demos\Azure_bot\qna-bot-v-4\index.js:51 const endpointConfig = botConfig.findServiceByNameOrId(BOT_CONFIGURATION); ^ TypeError: Cannot read property 'findServiceByNameOrId' of undefined.
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!