aws-sdk/clients/cognitoidentity has no exported member 'String'

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



aws-sdk/clients/cognitoidentity has no exported member 'String'



when starting an angular 6.1.2 project i have this error :



ERROR in
node_modules/aws-amplify-angular/lib/components/storage/photo-picker-component/photo-picker.factory.d.ts(3,10):
error TS2305: Module
'"/Users/knewtone/Dropbox/knewtone.com/projects/WorkSpace/softwares/yet.marketing/node_modules/aws-sdk/clients/cognitoidentity"'
has no exported member 'String'.



package.json



"name": "******",
"version": "3.0.2",
"license": "UNLICENSED",
"config":
"host": "****",
"cloudfront": "******",
"spechost": "******",
"speccloudfront": "*******"
,
"scripts": ,
"private": true,
"dependencies":
"@angular/animations": "^6.1.2",
"@angular/common": "^6.1.2",
"@angular/compiler": "^6.1.2",
"@angular/core": "^6.1.2",
"@angular/forms": "^6.1.2",
"@angular/http": "^6.1.2",
"@angular/platform-browser": "^6.1.2",
"@angular/platform-browser-dynamic": "^6.1.2",
"@angular/platform-server": "^6.1.2",
"@angular/pwa": "^0.7.2",
"@angular/router": "^6.1.2",
"@nguniversal/common": "^6.0.0",
"@nguniversal/express-engine": "^6.0.0",
"@nguniversal/module-map-ngfactory-loader": "^6.0.0",
"aws-amplify": "^1.0.5",
"aws-amplify-angular": "^1.0.3",
"aws-sdk": "2.289.0",
"bootstrap": "^4.1.3",
"chart.js": "^2.7.2",
"classlist.js": "^1.1.20150312",
"core-js": "^2.5.7",
"jquery": "^3.3.1",
"lodash": "^4.17.10",
"ngx-quill": "^3.4.0",
"popper.js": "^1.14.4",
"quill": "^1.3.6",
"sha1": "^1.1.1",
"ts-loader": "^4.4.2",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.26"
,
"devDependencies":
"@angular-devkit/build-angular": "~0.7.2",
"@angular/cli": "^6.1.2",
"@angular/compiler-cli": "^6.1.2",
"@angular/language-service": "^6.1.2",
"@types/jquery": "^3.3.5",
"@types/lodash": "^4.14.116",
"@types/node": "^10.5.7",
"codelyzer": "~4.4.3",
"cpy-cli": "^2.0.0",
"express": "^4.16.3",
"http-server": "^0.11.1",
"protractor": "~5.4.0",
"reflect-metadata": "^0.1.12",
"rxjs": "^6.2.2",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "^2.9.2",
"webpack-cli": "^3.1.0"




UPDATE



i see the error in the file



node_modules/aws-amplify-angular/lib/components/storage/photo-picker-component/photo-picker.factory.d.ts


import OnInit, ComponentFactoryResolver, OnDestroy, EventEmitter from '@angular/core';
import DynamicComponentDirective from '../../../directives/dynamic.component.directive';
import * as String from 'aws-sdk/clients/cognitoidentity'; // <--- the replaced statement

export declare class PhotoPickerComponent implements OnInit, OnDestroy
private componentFactoryResolver;
framework: String;
url: string;
picked: EventEmitter<string>;
loaded: EventEmitter<string>;
componentHost: DynamicComponentDirective;
constructor(componentFactoryResolver: ComponentFactoryResolver);
ngOnInit(): void;
ngOnDestroy(): void;
loadComponent(): void;



then i replaced the


import String from 'aws-sdk/clients/cognitoidentity';



with


import * as String from 'aws-sdk/clients/cognitoidentity';



and there is no error !









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard