amazon-archives / aws-cognito-angular-quickstart

An Angular(v5)-based QuickStart single-page app utilizing Amazon Cognito, S3, and DynamoDB (Serverless architecture)
https://cognito.budilov.com
Apache License 2.0
689 stars 304 forks source link

Any plans for updating to angular 6? #139

Closed richardsengers closed 6 years ago

richardsengers commented 6 years ago

Hi, I've updated my project to the latest release candidate of Angular 6 and Angular cli 6 but this breaking change: https://github.com/angular/angular-cli/issues/9827#issuecomment-369578814 is causing AWS Cognito library to fail

The problem with net/global is not so straightforward. We are removing it for 6.x, yes (#9812). And we do expect this to cause problems to some projects. But we're not doing it because we want to break projects, we're doing it because leaving it in also breaks other projects, and it is incorrect.

The incorrect part is libraries that are meant to run in the browser relying on node globals being available. Browser code runs in the browser, not in node, and shouldn't expect things that are not available in a browser context to be there.

So when you serve an Angular 6 project with AWS Cognito you are getting an error "Uncaught ReferenceError: global is not defined" in Buffer.js

richardsengers commented 6 years ago

Closing in favor of https://github.com/aws/aws-amplify/issues/678