Open
Description
Describe the bug
Installing the latest version of @aws-amplify/ui-angular and aws-amplify causes many warnings in the console when adding authentication. Also unable to remove warnings using angular.json.
To Reproduce
Steps to reproduce the behavior:
- Install latest version of Angular CLI. (Tried on Angular 9 and Angular 10)
- Follow instructions from here https://docs.amplify.aws/start/getting-started/installation/q/integration/angular
- Add authentication
- Start app (ng s)
Expected behavior
NO warnings.
Code Snippet
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in /Users/ehanchett/programming/work/eig/front/crty-ng-ui/node_modules/@aws-sdk/client-s3/dist/es/runtimeConfig.browser.js depends on @aws-sdk/eventstream-serde-browser. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in /Users/ehanchett/programming/work/eig/front/crty-ng-ui/node_modules/@aws-sdk/client-s3/dist/es/runtimeConfig.browser.js depends on @aws-sdk/hash-blob-browser. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in /Users/ehanchett/programming/work/eig/front/crty-ng-ui/node_modules/@aws-sdk/client-s3/dist/es/commands/PutBucketTaggingCommand.js depends on @aws-sdk/middleware-apply-body-checksum. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in /Users/ehanchett/programming/work/eig/front/crty-ng-ui/node_modules/@aws-sdk/client-s3/dist/es/commands/CreateBucketCommand.js depends on @aws-sdk/middleware-location-constraint. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
What is Configured?
//package.json
{
"name": "angular-tour-of-heroes",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~10.0.0",
"@angular/common": "~10.0.0",
"@angular/compiler": "~10.0.0",
"@angular/core": "~10.0.0",
"@angular/forms": "~10.0.0",
"@angular/platform-browser": "~10.0.0",
"@angular/platform-browser-dynamic": "~10.0.0",
"@angular/router": "~10.0.0",
"@aws-amplify/ui-angular": "^0.2.9",
"aws-amplify": "^3.0.18",
"rxjs": "~6.5.5",
"tslib": "^2.0.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1000.0",
"@angular/cli": "~10.0.0",
"@angular/compiler-cli": "~10.0.0",
"@types/node": "^12.11.1",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^6.0.0-next.1",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.9.5"
}
}
import { Component, OnInit } from '@angular/core';
import { onAuthUIStateChange } from '@aws-amplify/ui-components';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
title = 'angular-tour-of-heroes';
constructor(){}
ngOnInit(): void {
onAuthUIStateChange((authState, authData) => {
console.log(authState);
console.log(authData);
});
}
}