x promise then method not working
See original GitHub issueSubject of the issue
Promise support not working ?
Your environment
- version of node: 8.9.1
- version of npm: 5.5.1
Steps to reproduce
const Xray = require('x-ray');
const x = Xray();
x('https://blog.ycombinator.com', '.post', [{
title: 'h1 a',
link: '.article-title@href'
}]).then(res => console.log(res));
Expected behaviour
Should console log the array of news
Actual behaviour
TypeError: x(...).then is not a function
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Promise.prototype.then() - JavaScript - MDN Web Docs
The then() method of a Promise object takes up to two arguments: callback functions for the fulfilled and rejected cases of the Promise....
Read more >Promise then function not executed - javascript - Stack Overflow
I never get to see the log- "READ FROM DATABASE". However the function indexMovie executes perfectly. What am I doing wrong. I am...
Read more >Resolving the JavaScript Promise Error "TypeError: Cannot ...
After all, you get this error when calling the then() method on a Promise . And the TypeError indicates you are calling then()...
Read more >JavaScript Promises – The promise.then, promise.catch and ...
A promise is an object in JavaScript that will produce a value sometime in the future. This usually applies to asynchronous operations.
Read more >Wait for Promise to finish executing in Javascript Function
How can I get the function to wait for the APEX method to complete, so that it can assign the result to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like this might be related to #277.
Can you try installing with the repo clone URI? That might be a workaround.
I’m getting the same result