我在这里https://botkit.ai/docs/v0/readme-slack.html#getting-started和https://botkit.ai/docs/provisioning/slack-events-api.html上遵循slack-bot教程
~/bruce13/bots/mybot4 $ yo botkit
? What is your bot's name? bot-local
? Which messaging platform? slack
? (Optional) Mongo URI for state persistence:
? Client signing secret (from api.slack.com) <signing secret from slack app>
? Configure for single-team or multi-team? multi
? Client ID <id from slack app>
? Client Secret <Secret from slack app>
? OAuth Redirect URI (in the form https://<myhost.com>/install/auth) https://localhost/install/auth
create package.json
create bot.js
create .gitignore
create readme.md
create features/sample_echo.js
create features/sample_hears.js
create features/routes_oauth.js
create features/slack_features.js
create .env
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN botkit-bot-local@1.0.0 No repository field.
npm WARN botkit-bot-local@1.0.0 No license field.
added 216 packages in 5.431s
npm WARN deprecated @types/p-cancelable@1.0.1: This is a stub types definition. p-cancelable provides its own type definitions, so you do not need this installed.
npm WARN deprecated @types/p-retry@3.0.1: This is a stub types definition. p-retry provides its own type definitions, so you do not need this installed.
npm WARN botkit-bot-local@1.0.0 No repository field.
npm WARN botkit-bot-local@1.0.0 No license field.
+ botbuilder-adapter-slack@1.0.3
added 35 packages in 2.511s
bot项目已成功创建,但是当我尝试运行命令时
npm start
我收到此错误
~/bruce13/bots/mybot4?? $ npm start
> botkit-bot-local@1.0.0 start /Users/xyz-13551/bruce13/bots/mybot4
> node bot.js
/Users/xyz-13551/bruce13/bots/mybot4/node_modules/botbuilder-dialogs/lib/prompts/oauthPrompt.js:235
catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/xyz-13551/bruce13/bots/mybot4/node_modules/botbuilder-dialogs/lib/prompts/index.js:19:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! botkit-bot-local@1.0.0 start: `node bot.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the botkit-bot-local@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
无法在这里调试出什么问题???我检查了日志文件,发现以下内容,但没有帮助-
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@5.5.1
3 info using node@v8.9.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle botkit-bot-local@1.0.0~prestart: botkit-bot-local@1.0.0
6 info lifecycle botkit-bot-local@1.0.0~start: botkit-bot-local@1.0.0
7 verbose lifecycle botkit-bot-local@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle botkit-bot-local@1.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/xyz-13551/bruce13/bots/mybot4/node_modules/.bin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/xyz-13551/bruce13/maven/apache-maven-3.5.3/bin:/Users/xyz-13551/bruce13/apache-ant-1.9.14/bin
9 verbose lifecycle botkit-bot-local@1.0.0~start: CWD: /Users/xyz-13551/bruce13/bots/mybot4
10 silly lifecycle botkit-bot-local@1.0.0~start: Args: [ '-c', 'node bot.js' ]
11 silly lifecycle botkit-bot-local@1.0.0~start: Returned: code: 1 signal: null
12 info lifecycle botkit-bot-local@1.0.0~start: Failed to exec start script
13 verbose stack Error: botkit-bot-local@1.0.0 start: `node bot.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid botkit-bot-local@1.0.0
15 verbose cwd /Users/xyz-13551/bruce13/bots/mybot4
16 verbose Darwin 17.7.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v8.9.3
19 verbose npm v5.5.1
20 error code ELIFECYCLE
21 error errno 1
22 error botkit-bot-local@1.0.0 start: `node bot.js`
22 error Exit status 1
23 error Failed at the botkit-bot-local@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
任何帮助表示感谢,谢谢。