but28
but28

Reputation: 19

Starting with Bot Framework botbuilder and get an Assertion Error

I am following the video course "Creating Bots in the Microsoft Bot Framework Using Node.js" and having problems running the first app.js file.

I installed botbuilder, restify and did the npm install --save-dev @types/restify command as shown in the course.

When i try to run the app.js file I faced first the errorType that is solved here with downloading the botbuilder package version 3.13.1.


But now I get another error which I cant solve:

assert.js:350
    throw err;

AssertionError [ERR_ASSERTION]: The first character of a path should be `/` or `*`

Code-Scrrenshots are in the links: Code, ErrorCode

Does anyone have a similiar problem or knows how to help me? I would be very thankful. :)


My guess is that there is something wrong with my node_modules folder where assert.js can be found!? But i dont know what to update, or if I change something in assert.js directly. Couldnt find any solution online.

Upvotes: 1

Views: 1076

Answers (2)

Danilo
Danilo

Reputation: 1

typically this error occurs because in your route you forgot to add the "/" to instantiate your route.

Ex: /routes/libs/hello.ts

This would be a recommended way for you to instantiate your routes in your code.

Upvotes: 0

Gilmar Gonçalves
Gilmar Gonçalves

Reputation: 21

Instead of server.post('api/messages', con... do server.post('/api/messages', con...

The first character of a path should be / or *

Upvotes: 2

Related Questions