Botpress: Update trivia-template and links in documentation for X

Created on 29 May 2018  Â·  12Comments  Â·  Source: botpress/botpress

  • node version 6.11.3
  • following to starter tutorial [https://botpress.io/docs/beta/getting_started/trivia_content/]

    Botpress version: 10.10.0

Hey guys,

Just started the tutorial and when I run botpress start after cloning the repo https://github.com/botpress/tutorial.git, I get the following error:

ERR Error starting botpress:  Unexpected token ... /botpress/step-1/src/index.js:24
          .map(arg => ({ ...arg, name: arg.name.replace('args.', '') }))
                         ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at botpress._callee$ (/botpress/step-1/node_modules/botpress/lib/webpack:/src/botpress.js:352:26)
    at tryCatch (/usr/local/lib/node_modules/botpress/node_modules/regenerator-runtime/runtime.js:65:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/botpress/node_modules/regenerator-runtime/runtime.js:303:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/botpress/node_modules/regenerator-runtime/runtime.js:117:21)
    at step (/botpress/step-1/node_modules/botpress/lib/node.bundle.js:4682:191)
    at /botpress/step-1/node_modules/botpress/lib/node.bundle.js:4682:361

Any ideas?

Most helpful comment

@bissolli I think you still have a node process running on port :3000. You can close it, then relaunch 'npm run start' or change the PORT on botpress.js

All 12 comments

same here with botpress 10.2.0 and node 10

Tried updating my node to v8.11.2 and getting the following error now:

12:34:22 - debug: Loading middleware: fallback
12:34:22 - error: [FATAL] An unhandled exception occurred in your bot Error: bind EADDRINUSE null:3000
    at Object._errnoException (util.js:992:11)
    at _exceptionWithHostPort (util.js:1014:20)
    at listenOnMasterHandle (net.js:1415:16)
    at rr (internal/cluster/child.js:121:12)
    at Worker.send (internal/cluster/child.js:88:7)
    at process.onInternalMessage (internal/cluster/utils.js:42:8)
    at emitTwo (events.js:131:20)
    at process.emit (events.js:214:7)
    at process.emit (/botpress/step-1/node_modules/source-map-support/source-map-support.js:439:21)
    at emit (internal/child_process.js:772:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)
12:34:22 - error: Error: bind EADDRINUSE null:3000
    at Object._errnoException (util.js:992:11)
    at _exceptionWithHostPort (util.js:1014:20)
    at listenOnMasterHandle (net.js:1415:16)
    at rr (internal/cluster/child.js:121:12)
    at Worker.send (internal/cluster/child.js:88:7)
    at process.onInternalMessage (internal/cluster/utils.js:42:8)
    at emitTwo (events.js:131:20)
    at process.emit (events.js:214:7)
    at process.emit (/botpress/step-1/node_modules/source-map-support/source-map-support.js:439:21)
    at emit (internal/child_process.js:772:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `botpress start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /.npm/_logs/2018-05-29T08_34_22_123Z-debug.log

@bissolli I think you still have a node process running on port :3000. You can close it, then relaunch 'npm run start' or change the PORT on botpress.js

@mvdt true! My mistake... thanks! With nodejs v8.9.4 new problem now -.-'

12:46:54 - debug: Loading middleware: fallback
12:46:54 - info: Bot launched. Visit: http://localhost:3000
12:46:54 - error: Unhandled Rejection in Promise:  Promise {
  <rejected> TypeError: bp.dialogEngine.setFunctionMetadataProvider is not a function
    at jsdoc.explain.then.docs (/botpress/step-1/src/index.js:18:21)
    at <anonymous> } Reason: TypeError: bp.dialogEngine.setFunctionMetadataProvider is not a function
    at jsdoc.explain.then.docs (/botpress/step-1/src/index.js:18:21)
    at <anonymous>
12:46:54 - error: TypeError: bp.dialogEngine.setFunctionMetadataProvider is not a function
    at jsdoc.explain.then.docs (/botpress/step-1/src/index.js:18:21)
    at <anonymous>

Hey @slvnperron any clue?

@bissolli Which bot are you running? Have you tried doing a fresh bp init?

@bissolli , setFunctionMetadataProvider was renamed to registerActionMetadataProvider. But indeed maybe it makes more sense to init new bot from scratch.

Hi @epaminond and @slvnperron ,

  • Node: 8.11.2
  • NPM: 6.1.0
  • BotPress: 10.10.0

bp init works well! The problem is only with the trivia tutorial template [https://botpress.io/docs/beta/getting_started/trivia_template/]...

I am trying to understand how it works to start building my first bot, do you have any working tutorial for Botpress X? Looks like this Trivia one isn't working very well.

Thanks!

_(edited)_
Yeah the template at link seems to not be properly updated for X. I'll work on it

Started already

On Wed, May 30, 2018, 19:35 Alex Pletnov notifications@github.com wrote:

Assigned #587 https://github.com/botpress/botpress/issues/587 to
@emirotin https://github.com/emirotin.

—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/botpress/botpress/issues/587#event-1654027587, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAgGCF5eZuKz8tID_ofdahpImkd2tJ2Jks5t3spigaJpZM4UQ816
.

@emirotin , could you push to some branch whatever is ready here?

I think whatever I had was fixed here https://github.com/botpress/tutorial/pull/8 (merged)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JijeshP picture JijeshP  Â·  7Comments

rainmakerho picture rainmakerho  Â·  4Comments

crixx picture crixx  Â·  6Comments

mhjb picture mhjb  Â·  6Comments

rt3norio picture rt3norio  Â·  7Comments