-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluebird fails to load in a nwjs (nodewebkit) app #525
Comments
Try with at least 2.9.6+ |
2.9.6 works. 2.9.13 fails. |
Does node webkit delete the global setImmediate function or something? That's what's being undefined ... that or process nextTick? What does process.versions.node say in nw? |
It gives me: "1.2.0" |
That means |
I found this old commit for nw.js nwjs/nw.js#897 Sure enough if I add this line, bluebird will work.
That's pretty unfortunate, as I'm not sure if it should be bluebird's problem to deal with that sort of issue. |
Well promises should always use nextTick anyway, I am not sure what the reason for the check even was originally. setImmediate is macro task. |
It gives me the error:
I've shortened the filenames for readability.
I can confirm that it worked fine in bluebird version 2.9.3, but I'd say that after commit 98b0252 the issue occurred.
Reading over the code in that commit, it seems to be because
typeof window === "undefined"
isn't part of the isNode check. If I add this line manually then my application runs.
The text was updated successfully, but these errors were encountered: