-
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
ReferenceError: global is not defined - Intl polyfill #9920
Comments
^^^ That was a bug and is fixed in master As to the issue, the value The polyfill in question is also no longer needed by Angular as mentioned in the changelog for 5.0: https://github.com/angular/angular/blob/master/CHANGELOG.md#500-pentagonal-donut-2017-11-01 |
I'm having the exact same issue after upgrading my project to angular 6. Is there a solution for it? I'm not really understanding how to solve it from the reply above. |
@shiamalon Remove the intl imports completely - they aren't needed in v6. |
for those, who get the slightly different error ReferenceError: global is not defined at Object.getWindow, this is the fix:
see: auth0/auth0.js#753 |
For me polyfills.js from project generated by latest cli solved problem :) |
Had the same issue after upgrading to angular 6 with @angular/cli ng update Fixed it by adding
to polyfills.ts |
@MattMorrisDev thank's!
|
I am even getting this in router transiction when moved from angular 5 to 7.0.0.beta.5 . Any one got this issue before
|
* Migrate the complete (websocket-)communication to JSON-RPC. See the JSON-RPC specification on https://www.jsonrpc.org/specification. * The base classes for JSON-RPC are in the package io.openems.common/jsonrpc (https://github.com/OpenEMS/openems/blob/develop/io.openems.common/src/io/openems/common/jsonrpc) * Added some documentation on how the JSON-RPC communication works: https://openems.io/openems/latest/component-communication/index.adoc (https://github.com/OpenEMS/openems/blob/develop/doc/modules/ROOT/pages/component-communication) using antora + asciidoc + mermaid.js To implement a new JSON-RPC Request/Notification from UI via Backend to Edge, touch the following places - Add the Request in UI (https://github.com/OpenEMS/openems/blob/develop/ui/src/app/shared/jsonrpc/request) - Send the Request from UI (https://github.com/OpenEMS/openems/blob/develop/ui/src/app/shared/edge/edge.ts#L146) - Handle the Request in Backend (https://github.com/OpenEMS/openems/blob/develop/io.openems.backend.uiwebsocket.impl/src/io/openems/backend/uiwebsocket/impl/OnRequest.java#L101) - Handle the Request in Edge (https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.controller.api.websocket/src/io/openems/edge/controller/api/websocket/OnRequest.java#L91) Plus many other changes: Common: * Reimplement AbstractWebsocketClient and -Server * Implement fully asynchronous handling with functional interfaces * Pin JSON dependency version for Apache Felix * Add OpenemsNamedException to get unique IDs for OpenEMS errors * Set EVCS Controller Charge-Mode from UI Widget * Add EVCS Widgets to Index & Historic view * Apply Checkstyle to many projects * Improve Javadoc Backend: * Improve Metadata api & services * Improve Timedata api & services * Add io.openems.backend.b2bwebsocket module (e.g. SetGridConnSchedule and GetStatusOfEdges) * Create Backend Timedata.Dummy service * Define a EdgeConfig format. Parsing XML meta information from Bundle. * Add AbstractOpenemsBackendComponent parent class; similar to AbstractOpenemsComponent in Edge * Change format for Metadata.File Edge: * Refactor AbstractOpenemsComponent.activate()-method. No need for properties, as they are available via ComponentContext - Get rid of mandatory 'service_pid' in every Component Config. - Make Factory-PID available * Create Symmetric Balancing Schedule Controller für "SetGridConnSchedule": takes a schedule with ActivePowerSetPoints for defined timestamps and periods * Modbus-TCP slave: add automatic retry for starting the server * Fix REST-Api: use ApiWorker to constantly write values till timeout * EVCS-Api: add ChargePower channel * Add EVCS simulator * ComponentManager is able to update a component configuration using UpdateComponentConfig JSON-RPC Request * Split 'Sum' in 'Sum' and 'SumImpl' * Trigger OsgiValidateWorker on every configuration change * Fix KEBA using value instead of writeValue * Add EVCS Controller * Add Equals/LessThan/GreaterThan Channels for ManagedSymmetricEss and ManagedAsymmetricEss * Add OneFullCycleController UI * Refactor Chart Sections * UI: Refactor UI language selection * Remove temporarily disabled parts of UI * Fix formatting of numbers using 'formatNumber' * avoid having 'Edge' and 'Config' as @input parameter; use Service instead * Remove obsolete 'intl' polyfill (angular/angular-cli#9920) * Update @ionic/angular
what fixed for me: npm install --save-dev intl. |
In case, if your target is node in webpack (
|
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
(Side note: the issue template says to use
ng --version
, but that was removed in a recent version and wasn't mentioned as a breaking change :))Repro steps
Observed behavior
On app startup, I see the following error:
where index.js is the following:
It doesn't crash the application, although the browser I'm using doesn't need the polyfill. But I wouldn't expect to see this error normally.
The text was updated successfully, but these errors were encountered: