Question: 

I came across the new Stack Overflow Bot by Microsoft on the Stack Overflow blog and decided to give it a try.

After installing Node V8.1.4 for macOS, I installed the bot by running npm install in the StackBot directory. There weren't many issues, except for a warning returned.

MacBook-Air:StackBot USER$ npm install
npm WARN stackbot@1.0.0 No repository field.

up to date in 1.248s

Afterwards, I tried running the bot, using npm run start. The bot failed to startup and gave this error.

MacBook-Air:StackBot USER$ npm run start

> stackbot@1.0.0 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! stackbot@1.0.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the stackbot@1.0.0 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

The complete log is as follows:

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 npm@5.0.3
3 info using node@v8.1.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle stackbot@1.0.0~prestart: stackbot@1.0.0
6 silly lifecycle stackbot@1.0.0~prestart: no script for prestart, continuing
7 info lifecycle stackbot@1.0.0~start: stackbot@1.0.0
8 verbose lifecycle stackbot@1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle stackbot@1.0.0~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 stackbot@1.0.0~start: CWD: /Users/USER/Downloads/BotFramework-Samples-master/StackOverflow-Bot/StackBot
11 silly lifecycle stackbot@1.0.0~start: Args: [ '-c', 'node index.js' ]
12 silly lifecycle stackbot@1.0.0~start: Returned: code: 1  signal: null
13 info lifecycle stackbot@1.0.0~start: Failed to exec start script
14 verbose stack Error: stackbot@1.0.0 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 stackbot@1.0.0
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 stackbot@1.0.0 start: `node index.js`
23 error Exit status 1
24 error Failed at the stackbot@1.0.0 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

What is causing this error and is there a way to solve this?




1 Answer: 

have you try

rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install
 

More Articles


WebSocket closing immediately using Watson Speech-to-text JS SDK

Trying to use this code from a provided demo, using the latest watson-speech.js from https://github.com/watson-developer-cloud/speech-javascript-sdk:document.querySelector('#button').onclick = function () { fetch('myserverurl/api/token') .then(function(response) { return response.text(); }).

node.js - Microsoft Botframework Prompts.choice not getting validation response

I am using chatconnector to connect my Bot to an frontend chat app and writing the bot's response to my own database. The problem is when I am validating a prompt the bot responds but there's no API for me to grab the validation response. bot.dialog('/', [function (session) { builder.Prompts.cho

node.js - Firebase calling `child(all).equalTo(id)`

I like to check all children that contains a child with a value to the variable id.This is what I came up with:usersref.child(formData.openid + '/votes').child().equalTo(formData.appid).once('value', function(snapshot) {});This returned: Firebase.child failed: Was called with 0 arguments. Expects at


node.js - Get data having a maximum attribute from firebase in nodejs

So i am working with firebase in nodejs, there is a "number" attribute in each of my document of a specific table(name generated at runtime). I want to get the data having the attribute "number"'s maximum value.Here is my sample data:- -L1GIb7Vyn6Yhd5gghH0 correct: blah number: 9 questio

node.js - Hand Off Bot to Human using BotFramework (NodeJS)

I have crated a server application using botframework in NodeJS and configured for web chat channel in botframework.I want to validate the every reply that bot delivers to end user and those messages will be validated by human from an external web application.How can we trigger the bot from external

node.js - BotBuilder TypeError: builder.ConsoleConnector is not a constructor

I'm following the official quick start of Microsoft Bot Builder(SDK v3) for NodeJs: Create a bot with the Bot Builder SDK for Node.js 1- I made a new project with npm init2- then npm install --save botbuilder3- then I created a new file "app.js"var builder = require('botbuilder');var connector =


Logs showing WARNING when trying to credit bank accounts with Balanced Payments

Been seeing this in my logs today. ############################################################# # WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! # ############################################################# Using positional arguments is **DEPRECATED**. Please use the keyword optio

node.js - Correct way to send response when using Actions-on-google with koa.js

I'm trying to use actions-on-google with koa framework. I can't understand which request and response to use with AoG constructor in koa middleware. This is my code:const Koa = require( 'koa' )const koaBody = require('koa-body')const { DialogflowApp } = require('actions-on-google')const koaApp = new

actions on google - Implementing Conversation Webhook as Azure Function App

I have an azure function app that I am using as a webhook for my google assistant action. I've tried to follow the documentation for the proper response but I continually get the following error in the simulator when testing my webhook. Is there anything in my response message that looks wrong?Fai

java - Paypal expressCheckout integration (DoExpressCheckout) error

I have a ExpressCheckout integration setup in java google app engine and it working up to GetExpresschekout .but in finall call(DoExpressCheckout) I am unable to Authorize payment .it returnsan errorRESULT=1000&PNREF=E24P1FBB8FA4&RESPMSG=Generic processor error: 13116-The transaction is in p