-
Notifications
You must be signed in to change notification settings - Fork 4
(Carbon LDP + Angular 7.1.1) ReferenceError: global is not defined #327
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
This is the sample project It is ran along with a CarbonLDP instance on port 8083 |
Error that shows on screen when the instantiation of CarbonLDP is done (No other console.logs work before or after the instantiation).
|
Just to confirm, I am receiving the same error in the browser console; I am using a fresh Angular installation with the Angular CLI. |
Add the following line to
For more info about this fix, read: angular/angular-cli#8160 Dale and I just had this same issue and that fix worked for us. |
For reference, |
@codyburleson That seemed to do the trick! Thanks! As an added note for anyone reading, the variable that will contain the CarbonLDP object should be declared outside of the component constructor like |
As @codyburleson mentioned; assigning the alias for the "global" object to the window, allowed me to compile my Angular app with no issues. Thank you. |
A simple application where Carbon is declared on the app.component.ts crashes the app. Next, is a preview of the code. A full copy of the project should be attached as well.
app.component.ts
Dependency in package.json
Output of localhost:8083/.system/platform/
The text was updated successfully, but these errors were encountered: