-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Third party library fails after upgrade cli #10305
Comments
This is an issue caused by the library in question assuming the presence of node functionality within a web browser. For further details, please see this comment: #9827 (comment) |
@julianobrasil but that link says that the library will have to fix the issue too. Why are we closing the issue? |
@mohammedzamakhan, I'm considering that it is an issue to be fixed by dragula (which would be the "library" that comment is referring to), not by |
Try adding (window as any).global = window; in polyfills.ts |
This worked for me: valor-software/ng2-dragula#849 (comment) |
Try adding (window as any).global = window; in polyfills.ts |
@lukica88 that's worked for me, thank you! |
@bevlison It simply adds a new property called It is located in The actual cause for this problem is in the library which is assuming there is something called |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions
Repro steps
ng serve
: no errorsUncaught ReferenceError: global is not defined
) while the app doesn't runObserved behavior
Desired behavior
@angular/cli
shouldn't insert any errors (look in the next item - below -that@angular 6.0.0-rc.0
and@angular 6.0.0-rc.4
work right with@angular/cli 1.7.4
). At some point (@angular 6.0.0-rc.1
) angular itself was preventing dragula from work. But this behavior introduced in rc.1 was changed in rc.4. Now only@angular/cli 6.0.0-rc.x
is preventing dragula from work in a full upgraded project.Mention any other details that might be useful (optional)
@angular/cli 1.7.4
+@angular 6.0.0-rc.0
=> works@angular/cli 1.7.4
+@angular 6.0.0-rc.1
=> fails@angular/cli 1.7.4
+@angular 6.0.0-rc.2
=> fails@angular/cli 1.7.4
+@angular 6.0.0-rc.3
=> fails@angular/cli 1.7.4
+@angular 6.0.0-rc.4
=> works@angular/cli 6.0.0-rc.x
+@angular 6.0.0-rc.x
=> fails with all of 6.0.0-rc angular versionsThere's a repo available here: https://github.com/julianobrasil/material2-test/tree/dragula
Just take away
DragulaModule
fromapp.module.ts
and the app runs without errors.There's already an issue opened at dragula's repo on this subject: valor-software/ng2-dragula#849
The text was updated successfully, but these errors were encountered: