-
Notifications
You must be signed in to change notification settings - Fork 430
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
Uncaught ReferenceError: global is not defined #849
Comments
It happens with |
It's working with the following combinations: |
This is probably the cause: angular/angular-cli#9827 (comment) |
Anyone have any luck on this? |
Any update on this? |
I was able to work around this for now by adding an entry for dragula to the paths in my tsconfig.json
|
@rrajewski, I owe you a beer! BTW, I put it on |
You can add (window as any).global = window; in polyfills.ts |
|
Worked like charm. Thanks! |
The solution is just a workaround... Can this be solved properly? |
|
@Gerros unfortunately the fix will be just to integrate the workaround. Usually one would just send issues upstream to dragula (code search on both repos reveals no use of global here), but that project has not been touched in a year and I don’t think the original owner still looks at it (calling @bevacqua?). It will have to be @lukica88’s solution but in one of our source files (any one will do) with a link to this issue in a comment. (I can’t push new versions but @valorkin can.) |
@cormacrelf I can give you push access and could help to set up publish from CI Plus I can ask @bevacqua to do the same with dragula :) |
I already have push access. I am supposedly a maintainer. CI publish would make things a lot easier.
(Side note: I have been a bit busy maintaining my own drag and drop library. It’s not like you can really have a conflict of interest at this scale, but all the free time I have left over for drag and drop libraries is going there. I also haven’t used this in live code in almost a year. If anyone else is making heavy use of ng2-dragula, please become a maintainer too.)
… On 11 Jun 2018, at 23:28, Dmitriy Shekhovtsov ***@***.***> wrote:
@cormacrelf I can give you push access and could help to set up publish from CI
(like in ngx bootstrap)
Drop me a note if you are interested in maintaining ng2-dragula :)
Plus I can ask @bevacqua to do the same with dragula :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
adding this line in to pollyfills.ts fixed my problem if u r using angular 6 (window as any).global = window; |
Actually, this can't be fixed in It would appear I'm leaving this issue open so people can find it, and adding a note to the docs in lieu of actually solving it. |
adding this line in to pollyfills.ts fixed my problem if u r using angular 6 (window as any).global = window; |
Thanks @mhadji, there are a couple quick fixes for this listed above similar to what you have suggested. I think this issue has morphed into a bigger conversation over time. I was able to get things working with something similar to your suggestion. |
Guys. I’m leaving it open. Until the polyfill is no longer necessary. |
Caution, I installed ng2-dragula and got this error, so I uninstalled but the error remained... |
add this line in polyfills.ts (window as any).global = window; |
Any update on this? I am still getting this after upgrading to Angular 15 and I have the |
add this line in AppComponent constructor solved the problem in angular 16 |
Angular 6.0.0-rc.3 and Angular-CLI 6.0.0-rc.2. Error in browser console. Will try and figure out solution and report back...
The text was updated successfully, but these errors were encountered: