-
-
Notifications
You must be signed in to change notification settings - Fork 241
Global 'document' polyfill causes crashes when used with some node packages #1144
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
Comments
Hey @vcooley, |
related to #1137 |
Is there a solution / work around? I am getting the stack trace below. This is the first part, it repeats the same TypeError: document.createElement is not a function several times, each time in reference to rxjs/util/Immediate.js
My package.json is: |
Sorry, I found a I then had a problem with Observable.fromPromise. I found here that I was missing |
I'm getting the same error as @david-quadpro package.json:
|
I spoke to someone yesterday on Slack that had |
@david-quadpro That's it. The Problem solved. |
HI all, |
BREAKING CHANGES: The `document` object is no longer property of the `global` object. This may cause behavioral changes in some plugin that use the `document` object to determine if they're running in browser context. fixes #1144
BREAKING CHANGES: The `document` object is no longer property of the `global` object. This may cause behavioral changes in some plugin that use the `document` object to determine if they're running in browser context. fixes #1144
BREAKING CHANGES: The `document` object is no longer property of the `global` object. This may cause behavioral changes in some plugin that use the `document` object to determine if they're running in browser context. fixes #1144
With
5.0.0
, a dependency I was using now causes an exception. Switching back to4.*.*
fixes the issue. In my case I'm using fuzzball, whose default module has a dependency tree with node standard modules that are not available in Nativescript. Instead, I'm using the minified umd version which has worked up untilnativescript-angular: 5.0.0
and Angular 5. Here is the stack trace for iOS:I'm including a sample project whose package.json you can change to the following in order to no longer get this error:
Finally, here is the unminified version of the block that fails:
Edit:
Attaching project. Also, this error can be fixed by changing the line
else if (doc && "onreadystatechange" in doc.createElement("script"))
to
else if (doc && document.createElement && "onreadystatechange" in doc.createElement("script"))
dependency-error.zip
The text was updated successfully, but these errors were encountered: