moos/wordpos

ReferenceError: Promise is not defined

irSteve opened this issue · 2 comments

On an Ubuntu VM running on Azure, I am getting this error:

ReferenceError: Promise is not defined at null.getNouns (/home/azureuser/node/XMLParser/node_modules/wordpos/src/wordpos.js:131:12)

When I debug with the node debugger, I can see that wordPOS and getNouns() are clearly there when instantiating like this:

var WordPOS = require('wordpos'); var wordpos = new WordPOS();

I have tried this code form:

`wordpos.getNouns(_content, function(result, err){
if(err){
console.log(err.message);
return;
}

  _item.tags = result;
});`

and this code form:
wordpos.getNouns(_content) .then(function(result){ _item.tags = result; }) .catch(function(err){ console.log('Error in backdoorsurvival: ' + err.message); });

with identical results.

This seems like its broken but I could be missing some key info - in which case I would appreciate your feedback.

moos commented

Verify your version of nodejs -- try this:

$ node -v
v5.4.0

$ node
> typeof Promise
'function'
>
(To exit, press ^C again or type .exit)
>
moos commented

Inactive - closing.