albinscode / atgenerator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Promise is not defined

Houpert opened this issue · comments

Os information

npm -v : 1.4.28
node -v : v0.10.36
nodejs -v : v0.10.37

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty

node commands/activity.js report -u yhoupert -j templates/followup.json -F
or
nodeJs commands/activity.js report -u yhoupert -j templates/followup.json -F

ERR! info generator Processing between dates: "2016-04-04T00:00:00+02:00" and "2016-11-18T00:00:00+01:00"
ERR! report command ReferenceError: Promise is not defined
ERR! report command     at Object.module.exports.getFromFile (/home/yhoupert/Documents/DeclarationTemps/Albin-Generator/atgenerator/node_modules/od-provider/index.js:18:16)
ERR! report command     at ActivityGenerator.generate (/home/yhoupert/Documents/DeclarationTemps/Albin-Generator/atgenerator/lib/ActivityGenerator.js:301:14)
ERR! report command     at performCommand (/home/yhoupert/Documents/DeclarationTemps/Albin-Generator/atgenerator/commands/activity-report.js:41:15)
ERR! report command     at /home/yhoupert/Documents/DeclarationTemps/Albin-Generator/atgenerator/commands/activity-report.js:29:9
ERR! report command     at invokeCallback (/home/yhoupert/Documents/DeclarationTemps/Albin-Generator/atgenerator/node_modules/inquirer/node_modules/pinkie-promise/node_modules/pinkie/index.js:60:12)
ERR! report command     at Array.forEach (native)
ERR! report command     at publish (/home/yhoupert/Documents/DeclarationTemps/Albin-Generator/atgenerator/node_modules/inquirer/node_modules/pinkie-promise/node_modules/pinkie/index.js:147:32)
ERR! report command     at Array.publishFulfillment [as 0] (/home/yhoupert/Documents/DeclarationTemps/Albin-Generator/atgenerator/node_modules/inquirer/node_modules/pinkie-promise/node_modules/pinkie/index.js:152:2)
ERR! report command     at Object.asyncFlush (/home/yhoupert/Documents/DeclarationTemps/Albin-Generator/atgenerator/node_modules/inquirer/node_modules/pinkie-promise/node_modules/pinkie/index.js:17:19)
ERR! report command     at Object.immediate._onImmediate (timers.js:372:16)
ERR! report command  [ReferenceError: Promise is not defined]

Added
var Promise = require('promise'); in od-provider/index.js for generate file
Followup don't merge the file

fixed in od-provider module.
Run npm install to update your module.