Skip to content

Uncaught ReferenceError: global is not defined in latest Angular 6 RC #678

@richardsengers

Description

@richardsengers

Do you want to request a feature or report a bug?
Feature / Bug

What is the current behavior?
A dependencies of Buffer.js is causing an error on global node variable.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than AWS Amplify.
Create a new Angular cli 6 project and add AWS Cognito. Once you import aws-sdk or amazon-cognito-identity-js you'll get an error "Uncaught ReferenceError: global is not defined" from Buffer.js

What is the expected behavior?
Run an Angular 6 project without the dependency of the global node variable

I'm testing an Angular 6 app with AWS Cognito and noticed an error in my console.

"Uncaught ReferenceError: global is not defined"

After some research I came acros this comment from the Angular CLI team

angular/angular-cli#9827 (comment)

I think when Angular 6 is released, this is going to be an issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationRelated to documentation feature requests

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions