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
window
is defined, breaking platform-detection in node environment.
#71
Comments
Check out famous libs like jquery or underscore. I suggest test the variable
|
Thanks. Unfortunately that kind of test will only work if the JS has been loaded with It would be helpful if the documentation had a section on limitations, outlining that the node code runs in a browser environment. |
I have a similar issue related to the presence of the
|
@hendrikswan just reported the same issue. This is a general concern that I've felt since coding ironNode. In fact we cannot overwrite |
@s-a is it even possible to do something about this? Does the global window var come from electron? Update: Sorry was busy typing this question while you were commenting :) |
Yes this is the result of Electron ' s hybrid environment. |
To run the nodejs app in a nodejs environment iron-node would need to start the app in another process and attach the chrome devtools in the electron UI to that process via ipc or rpc. Unfortunately this step is not simple. One issue that is unclear to me is how the Electron UI is involved. Are there two BrowserWindows in iron-node, one for the nodejs app being debugged and one for the iron-node UI? Mixing the iron-node UI with the nodejs app makes solving the |
If this one http://stackoverflow.com/questions/35211056/how-to-change-the-node-js-module-wrapper would be possible we could easy pass a |
I don't see how the module wrapper can help here. |
While we use |
There are some hacky ways to manipulate nodejs |
Having the same issue with the mongodb (js-bson) driver that fails when global.window is defined. Anyone an idea why setting Edit; exactly like @dhritzkiv says |
@jonaswindey have you tried updating to the latest mongodb? Updating mongoose (which included an updated mongodb) fixed this issue for me. |
Yes I did, I even forked mongoose to use a patched version of js-bson (https://github.com/officert/js-bson.git) that disabled the check on global.window I keep getting @dhritzkiv Which npm version do you use? I'm using node v5.2.0 but still npm 2.x |
Stay tuned . I will try some things out this weekend. |
Hey guys. could not wait to try this out. 😄 There are new options available now at Line 6 in 5195b8b
I think this is a pretty cool solution. |
My tests performed well. Just published https://github.com/s-a/iron-node/releases/tag/v2.2.15 to npm. |
So far so good for me too! On Thu, 18 Feb 2016 at 14:08 Stephan Ahlf notifications@github.com wrote:
|
This is much better, thanks! But there is still a bit more to do ;-) I'll open a new issue about |
We have code that tests its environment:
To use iron-node on node apps with such tests,
window
from iron-node cannot be visible to the app under debug.The text was updated successfully, but these errors were encountered: