Use flows in chat


#1

Once I install and setup a new instance of BP, how I can use flows in the chat?

Also after fresh installation I am facing this error in console.

ERR Error starting botpress: Unexpected identifier E:\supportbot\src\index.js:10
module.exports = async bp => {
^^
SyntaxError: Unexpected identifier
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$ (E:\supportbot\node_modules\botpress\lib\webpack:\src\botpress.js:416:26)
at tryCatch (C:\Users\Piyush.singh\AppData\Roaming\npm\node_modules\botpress\node_modules\regenerator-runtime\runtime.js:65:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Piyush.singh\AppData\Roaming\npm\node_modules\botpress\node_modules\regenerator-runtime\runtime.js:303:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\Piyush.singh\AppData\Roaming\npm\node_modules\botpress\node_modules\regenerator-runtime\runtime.js:117:21)
at n (E:\supportbot\node_modules\botpress\lib\webpack:\src\botpress.js:71:1)
at E:\supportbot\node_modules\botpress\lib\webpack:\src\botpress.js:71:100:

But I can access the dashboard.

Now I want to create a flow and use it in chat, how I can do that?

node version=6.10.3
npm version = 6.1.0

botpress version 10.22.3


#2

The minimal required node version is 8.2 (as specified in README).


#3

Still error.
node version–10.6.0
npm version --6.1.0

ERR Error starting botpress: bp is not defined ReferenceError: bp is not defined
at Object. (E:\supportbot\src\index.js:53:2)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at botpress._callee$ (E:\supportbot\node_modules\botpress\lib\webpack:\src\botpress.js:416:26)
at tryCatch (C:\Users\Piyush.singh\AppData\Roaming\npm\node_modules\botpress\node_modules\regenerator-runtime\runtime.js:65:40)
at Generator.invoke [as _invoke] (C:\Users\Piyush.singh\AppData\Roaming\npm\node_modules\botpress\node_modules\regenerator-runtime\runtime.js:303:22)
at Generator.prototype.(anonymous function) [as next] (C:\Users\Piyush.singh\AppData\Roaming\npm\node_modules\botpress\node_modules\regenerator-runtime\runtime.js:117:21)
at n (E:\supportbot\node_modules\botpress\lib\webpack:\src\botpress.js:71:1)
at E:\supportbot\node_modules\botpress\lib\webpack:\src\botpress.js:71:1


#4

Try to install botpress under node v8.11.3


#5

That worked. Thanks.