ReferenceError: Can't find variable: Promise
See original GitHub issueI get the error ReferenceError: Can't find variable: Promise
when I use selectChoose
in an acceptance test. It runs fine in the browser but fails in the console.
I’m using Ember 2.11.1
, Ember Power Select 1.8.5
and Phantom JS 2.1.1
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Can't find variable: Promise in Phantomjs - Stack Overflow
I am writing test cases with Jasmin. When I call bellow method,. initialize({"Data": "primary"});. Which is: initialize: function ...
Read more >ReferenceError: Can't find variable: RTCRtpReceiver
hi, I try to build a mobile app with react-native , on server side everything works perfectly i can create router and send ......
Read more >ReferenceError: Can't find variable: process - ServiceNow
The java console reports "ReferenceError: Can't find variable: process". Pushing the component to my dev instance the component works fine.
Read more >ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >ReferenceError: Can't find variable - Codecademy
ReferenceError : Can't find variable ... If you get an error like this it is because you are trying to enter a string...
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 Free
Top 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
Ok, I’ve found the cause. It turns out it is a problem with promises and regenerator.
In recent versions of EPS I started using async await on tests to people can do things like
await selectChoose('#my-select', 'Barry')
. But while I take care of conditionally import theregenerator
runtime in browsers that don’t support generators, seems that the runtime relies on the existence of a global promise.I’ll investigate if there is a workaround. In the meanwhile my advice is:
That’ll do it! My initial instinct was that it was babel-related, but I must not have configured the polyfill correctly in the build file. Thanks @luketheobscure!