Skip to content
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

photopicker component imports CognitoIdentify client unnecessarily #1442

Closed
srchase opened this issue Aug 14, 2018 · 6 comments
Closed

photopicker component imports CognitoIdentify client unnecessarily #1442

srchase opened this issue Aug 14, 2018 · 6 comments
Assignees
Labels
Angular Related to Angular 2+ Storage Related to Storage components/category

Comments

@srchase
Copy link

srchase commented Aug 14, 2018

Hello,

An issue has been opened on the JavaScript SDK: aws/aws-sdk-js#2192

Specifically, the photopicker component is causing issues when importing the CognitoIdentity client.

I don't believe that component needs to import the client.

I'm happy to submit a PR if it would be helpful to correct this issue.

@AllanZhengYP
Copy link
Contributor

Basically in aws-sdk v2.287.0, the unused typings are removed from the model, which contains the String type referred here. You can just remove the String import and instead use normal string types here.

@manueliglesias manueliglesias added the bug Something isn't working label Aug 14, 2018
@manueliglesias manueliglesias self-assigned this Aug 14, 2018
@mlabieniec mlabieniec added Storage Related to Storage components/category and removed bug Something isn't working labels Aug 21, 2018
@mlabieniec mlabieniec added the Angular Related to Angular 2+ label Aug 21, 2018
@haverchuck
Copy link
Contributor

The { String } import has been removed from photo-picker-factory.ts.

@ShaneCotter
Copy link

ShaneCotter commented Dec 9, 2018

I am still getting this error even though in my photo-picker-factory.ts there is no String import on line 3. Can someone help please.

@appwerkz
Copy link

Yes, I am getting the same error too.

ERROR in node_modules/aws-amplify-angular/lib/components/storage/photo-picker-component/photo-picker.factory.d.ts(3,10): error TS2305:
Module '"{hard coded path}/aws-activities/aws-amplify-ionic/aws-amplify-ionic-sample/node_modules/aws-sdk/clients/cognitoidentity"' has no exported member 'String'.

@harsh594
Copy link

I replaced import { String } from 'aws-sdk/clients/cognitoidentity'; with import * as String from 'aws-sdk/clients/cognitoidentity'; and it works for me now.

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Angular Related to Angular 2+ Storage Related to Storage components/category
Projects
None yet
Development

No branches or pull requests

8 participants