-
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
[bug] Uncaught ReferenceError: global is not defined #8160
Comments
I seeing the same issue as well with |
|
Strange I've reverted to |
@dottodot |
Thanks that worked. I've gone back to |
Same problem here since |
Same error using rc.3 Uncaught ReferenceError: global is not defined also importing another library (jsrsasing). It worked fine until rc.2. |
Hi guys, could you please provide a simple repo of this issue, that way it's easier and faster for the team to be able to debug the issue. |
@RicardoVaranda https://github.com/dottodot/ang5-test All i've done is create a new project with 1.5.0-rc.3 and included |
This is definitely related to #8132 as we've removed the node |
Just wanted to let you know we're looking into this. For the |
Hey, I just wanted to chime in. I have the same issue upgrading to
|
With Rc.6 still having same problem. |
There's a pull request which I assume will fix it guess we just need to wait for it to be added |
This is fixed for me with release |
Hi, I have just installed it, imported and added to NgModule -> Imports, and my app crashes with this error. Is there any step I am missing?? |
On version 6 of Angular CLI we are removing the shim for If you are using a library that assumes these globals are present, you can try manually shimming it inside your
I ran a quick test with |
@filipesilva Thank you so much! |
declare var $: any; |
When I adding sockjs-client, I got the same issue. I did as @tobias74 ,maybe it worked,but the brower refreshes frequenly. |
@tobias74 Thanks that worked |
@filipesilva |
I removed all these things. AND NOW :D `import 'core-js/es6/symbol'; import 'core-js/es7/array'; /** IE10 and IE11 requires the following for NgClass support on SVG elements */ /** IE10 and IE11 requires the following for the Reflect API. */ /** Evergreen browsers require these. **/ /**
/***************************************************************************************************
/***************************************************************************************************
/**
|
Is this the right way of implementing socket.io in Angular 2? I mean does the above line give any side affects that may be obtrusive in the future? |
solution of @filipesilva is worked . |
with this solution angular/angular-cli#8160 (comment)
* update to Abgular 7.2.x * update travis * bump more packages * at least it builds * update travis * bump package * bump mapbox packages * bump codelyzer * bump core js * fix polyfill error with this solution angular/angular-cli#8160 (comment)
@filipesilva I see this is pretty old issue but even today, newly generated project and I am testing apolo graphql does not add the global. so I have to add to my Is this normal ? |
Yes. |
Will this ever be fixed in the main module? Still apparently happens in new projects. I've tried adding a basic AwsAmplify project and this happens. |
@willkara, read the comment right before yours. Follow the stack trace to see which package uses (also, "happens in new projects." is very different from happened when you "tried adding a basic AwsAmplify") |
@amitport fair comment. I'll follow the trace again and see where it happens. |
In case, if your target is node in webpack (
|
@filipesilva can you lock this issue? seem to keep "sprouting" in all directions even though it's closed. |
just add (window as any).global = window; in polyfills.ts in ionic |
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. |
Bug Report or Feature Request (mark with an
x
)Versions.
Repro steps.
create angular/cli project
add dependency and import
[email protected]
ng serve --aot
open browser
The log given by the failure.
The text was updated successfully, but these errors were encountered: