Update (January 12, 2018):
The developers of amazon-cognito-identity-js blocked the aws-sdk version in v1.31.0, so you no longer need to aws-sdk , just update the package:
npm install amazon-cognito-identity-js@1.31.0 --save
There seems to be a problem with the aws-sdk package. This is the dependency of the amazon-cognito-identity-js package that you are using.
You can try to lower it by doing:
npm install aws-sdk@2.177.0 --save
source share