-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when running direcline #1
Comments
Did you pull the code from github and run it? or did you pull down the package from npm? If the former, because it's a typescript project you have to build it using npm run build. It should be easier to just npm install the package though! |
Hello ryan
|
@mohdkhan786 sorry you're running into issues. There may be a problem with the npm script approach right now. Can you try creating an app.js with the following code (and your own parameters in the initializeRoutes function) and try running it (node app.js in the cmd line)?
|
Hello @ryanvolum , step 1 => I created a new app.js file in "NodeDirectline" folder as per mention in my previous steps with below code const directline = require("offline-directline"); Run mycode (node app.js in the command line) and it display a messsage "listening".
|
@mohdkhan786 is your bot running locally at http://localhost/AppointmentBot/api/messages? Your bot should be receiving messages and replying to them. It seems odd that that bot endpoint doesn't have a port. Are you able to test your bot in the emulator with that endpoint? I've identified the "couldn't send retry" return from webchat as a bug, and will implement a fix, but either way you should still be seeing messages from your bot. |
My bot in C# I have hosted in local IIS server and not express IIS. Do you suggest some other approach with port number? |
Is this code works only with express IIS and not with local server. Default port for local IIS is 80 const express = require("express"); |
@mohdkhan786 the port number really shouldn't matter. This package is just setting up a REST service that your bot and your client can both make calls against. I've since tested the package with a C# bot and everything seems to be working. Are you sure you're passing the right URLs into the initializeRoutes function? The first should be where you want to host the connector, and the second should be the endpoint where your bot is hosted (including api/messages) |
Hello @ryanvolum @ryvolum After my further investigation, I identified one problem may be help you to check. What I mean is same sample string length bot works with Ver3 but when i upgrade bot builder, then problem comes.Then It will not work even if we downgrate bot builder version t0 Ver 3.0.0.0 Is there anything in your offline directline dl which depends on Version3.0.0.0 Will be really helpful if you suggest something. Regards
|
@ryanvolum thanks in advance |
@ryanvolum Error message on command prompt, while sending the message in the Web-Chat client.Created conversation with conversationId: da7191c9-4433-4c8a-b6f3-0cc29bc46a21 Regards, |
Hi !
I tried your solution and got this error :
module.js:471
throw err;
^
Error: Cannot find module 'C:\Users\h21178\Desktop\offline_dl-master\dist\cmdutil.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3
Command :
npm run directline 3000 localhost://127.0.0.1:3979/api/messages
Thanks :)
The text was updated successfully, but these errors were encountered: