botpress / tutorial

Getting Started – Tutorial for Botpress X (https://botpress.io/docs/10.0/getting_started/)
7 stars 10 forks source link

Can not Open http://localhost:3000/lite/?m=platform-webchat&v=fullscreen #4

Open 213Dean opened 6 years ago

213Dean commented 6 years ago

I downloaded this tutorial into a local windows machine and followed below instructions:

https://botpress.io/docs/10.0/getting_started/trivia_template/

I got 'npm install' and 'npm start' executed successfully and I am able to open

http://localhost:3000

but I cannot open this

http://localhost:3000/lite/?m=platform-webchat&v=fullscreen through Chrome or IE,

Chrome reports:

module.jsx:48 GET http://localhost:3000/js/modules/channel-web/fullscreen 
value @ module.jsx:48
value @ module.jsx:88
updateClassInstance @ react-dom.production.min.js:111
beginWork @ react-dom.production.min.js:133
r @ react-dom.production.min.js:161
i @ react-dom.production.min.js:161
a @ react-dom.production.min.js:162
x @ react-dom.production.min.js:169
w @ react-dom.production.min.js:168
v @ react-dom.production.min.js:167
h @ react-dom.production.min.js:165
enqueueSetState @ react-dom.production.min.js:108
v.setState @ react.production.min.js:12
o.onStateChange @ connectAdvanced.js:205
y @ createStore.js:173
(anonymous) @ index.js:14
dispatch @ applyMiddleware.js:35
(anonymous) @ index.js:147

Any idea where did I go wrong?

sbpipb commented 6 years ago

Same problem, the path fullscreen is missing


Request URL: http://localhost:3000/js/modules/channel-web/fullscreen
Request Method: GET
Status Code: 404 Not Found
Remote Address: [::1]:3000
Referrer Policy: no-referrer-when-downgrade```
BDGLunde commented 6 years ago

I'm trying to follow the tutorial and I cannot get the webchat view to successfully render either.

I'm also throwing an error at the end of "npm/bp start", but I don't know if it's related (it doesn't stop the project from building and running the server):

error: Unhandled Rejection in Promise: Promise {

TypeError: **bp.dialogEngine.setFunctionMetadataProvider is not a function** at jsdoc.explain.then.docs (C:\Users\elunde\documents\bots\tutorial\step-1\src\index.js:18:21) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) } Reason: TypeError: bp.dialogEngine.setFunctionMetadataProvider is not a function at jsdoc.explain.then.docs (C:\Users\elunde\documents\bots\tutorial\step-1\src\index.js:18:21) at at process._tickDomainCallback (internal/process/next_tick.js:228:7) 11:58:52 - error: TypeError: bp.dialogEngine.setFunctionMetadataProvider is not a function at jsdoc.explain.then.docs (C:\Users\elunde\documents\bots\tutorial\step-1\src\index.js:18:21) at at process._tickDomainCallback (internal/process/next_tick.js:228:7)
harshadabhanose commented 6 years ago

Any update how we can resolve this issue?

sbpipb commented 6 years ago

Try updating your package dependencies and include channel-web.. Here is my package.json file

"dependencies": {
    "@botpress/channel-web": "^10.6.2",
    "botpress": "^10.0.6",
    "botpress-platform-webchat": "^0.5.0",
    "jsdoc-api": "^4.0.2",
    "lodash": "^4.17.5",
    "moment": "^2.20.1",
    "yn": "^2.0.0"
  },
213Dean commented 6 years ago

@sbpipb Thanks very much for the help, with your suggestion I am now able to open this link

http://localhost:3000/lite/?m=platform-webchat&v=fullscreen

and when I type in 'play' on this screen to the bot as introduced in the tutorial -- it comes with nothing on the screen, but I do have corresponding logs in the console...

Any further suggestions? I am completely new to this project and nodejs....

17:25:33 - warn: Could not serve module [@botpress/channel-web] at: C:\Users\xxxxxx\chatbot\botpress\tutorial-master\step-1\node_modules\@botpress\channel-web\bin\lite\fullscreen.bundle.js.map.bundle.js 17:25:33 - warn: Could not serve module [@botpress/channel-web] at: C:\Users\xxxxxx\chatbot\botpress\tutorial-master\step-1\node_modules\@botpress\channel-web\bin\lite\fullscreen.bundle.js.map.bundle.js 17:25:42 - debug: Dialog: [main] (ask-question) <~ RECV "asd" 17:25:42 - debug: Dialog: [main] (ask-question) !! KALL 17:25:42 - debug: Dialog: [main] (ask-question) .. KALL 17:25:42 - debug: Dialog: [main] (ask-question) ?X KALL 17:25:42 - debug: Dialog: [main] (ask-question) !! RECV 17:25:42 - debug: Dialog: [main] (ask-question) !! EXEC func "validateAnswer" 17:25:42 - debug: Dialog: [main] (ask-question) !! SSET 17:25:42 - debug: Dialog: [main] (ask-question) .. RECV 17:25:42 - debug: Dialog: [main] (ask-question) ?? MTCH cond = "true" 17:25:42 - debug: Dialog: [ N/A ] ( N/A ) >> FLOW "bad-answer" 17:25:42 - debug: Dialog: [main] (bad-answer) !! ENTR 17:25:42 - debug: Dialog: [ N/A ] ( N/A ) ~> SEND "#!text-cTkerJ" 17:25:42 - debug: Dialog: [main] (bad-answer) .. NOWT 17:25:42 - debug: Dialog: [main] (bad-answer) ?? MTCH cond = "true" 17:25:42 - debug: Dialog: [ N/A ] ( N/A ) >> FLOW "next" 17:25:42 - debug: Dialog: [main] (next) !! ENTR 17:25:42 - debug: Dialog: [main] (next) .. NOWT 17:25:42 - debug: Dialog: [main] (next) ?? MTCH cond = "true" 17:25:42 - debug: Dialog: [ N/A ] ( N/A ) >> FLOW "next-question" 17:25:42 - debug: Dialog: [main] (next-question) !! ENTR 17:25:42 - debug: Dialog: [ N/A ] ( N/A ) ~> SEND "#!text-kFIEdO" 17:25:42 - debug: Dialog: [main] (next-question) .. NOWT 17:25:42 - debug: Dialog: [main] (next-question) ?? MTCH cond = "true" 17:25:42 - debug: Dialog: [ N/A ] ( N/A ) >> FLOW "ask-question" 17:25:42 - debug: Dialog: [main] (ask-question) !! ENTR 17:25:42 - debug: Dialog: [main] (ask-question) !! EXEC func "sendRandomQuestion" 17:25:42 - debug: Dialog: [main] (ask-question) !! SSET

harshadabhanose commented 6 years ago

Same error here

bissolli commented 6 years ago

same here

prashanthv commented 6 years ago

same

dwolfx commented 5 years ago

same Any fix for this error?

GChester commented 4 years ago

Same problem and it does not seem to be a priority. Can not use the Chatbot in FullScreen.