Ich bin über den neuen Stack Overflow Bot by Microsoft im Stack Overflow Blog gestolpert und habe mich entschieden, es zu versuchen.Fehler beim Ausführen des neuen Stack Overflow Bot
Nach der Installation von Node V8.1.4 für Mac OS habe ich den Bot installiert, indem ich npm install
im StackBot-Verzeichnis ausgeführt habe. Es gab nicht viele Probleme außer einer Warnung.
MacBook-Air:StackBot USER$ npm install
npm WARN [email protected] No repository field.
up to date in 1.248s
Danach habe ich versucht mit den Bot, npm run start
verwenden. Der Bot konnte nicht gestartet werden und gab diesen Fehler aus.
MacBook-Air:StackBot USER$ npm run start
> [email protected] start /Users/USER/Downloads/BotFramework-Samples-master/StackOverflow-Bot/StackBot
> node index.js
Missing one of BOTBUILDER_APP_ID, BOTBUILDER_APP_PASSWORD, LUIS_MODEL, KB_ID, QNA_KEY, QNA_URL, BING_SEARCH_CONFIG, BING_SEARCH_KEY, TEXT_ANALYTICS_KEY, TEXT_ANALYTICS_URL, DIALOG_ANALYZER_CLIENTID, DIALOG_ANALYZER_KEY or DIALOG_ANALYZER_URL in environment variables!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
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! /Users/USER/.npm/_logs/2017-09-25T12_56_14_988Z-debug.log
Das vollständige Protokoll ist wie folgt:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/USER/Downloads/BotFramework-Samples-master/StackOverflow-Bot/StackBot/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
10 verbose lifecycle [email protected]~start: CWD: /Users/USER/Downloads/BotFramework-Samples-master/StackOverflow-Bot/StackBot
11 silly lifecycle [email protected]~start: Args: [ '-c', 'node index.js' ]
12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `node index.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
14 verbose stack at emitTwo (events.js:125:13)
14 verbose stack at EventEmitter.emit (events.js:213:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:125:13)
14 verbose stack at ChildProcess.emit (events.js:213:7)
14 verbose stack at maybeClose (internal/child_process.js:897:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
15 verbose pkgid [email protected]
16 verbose cwd /Users/USER/Downloads/BotFramework-Samples-master/StackOverflow-Bot/StackBot
17 verbose Darwin 16.7.0
18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
19 verbose node v8.1.4
20 verbose npm v5.0.3
21 error code ELIFECYCLE
22 error errno 1
23 error [email protected] start: `node index.js`
23 error Exit status 1
24 error Failed at the [email protected] start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
Was diesen Fehler verursacht und ist es eine Möglichkeit, dieses Problem zu lösen?
Es sagt, was der Fehler ist: Sie benötigten Umgebungsvariablen nicht festgelegt haben (_ "Missing one of ..." _). Bitte lesen Sie [diese Seite] (https://github.com/Microsoft/BotFramework-Samples/tree/master/StackOverflow-Bot#configuration) um den Bot zu konfigurieren. – robertklep
Hey, wie hast du npm install im StackBot Verzeichnis ausgeführt? Ich meine, was genau ist das? – Neel