Reputation: 133
Does anyone have any examples or could possibly point me in the right direction on how to integrate aws-sdk within Ionic 2?
I tried running the code below:
npm install aws-sdk --save
typings install dt~aws-sdk --save --global
But now when I try to build or run the app I get:
TypeScript error: typings/globals/aws-sdk/index.d.ts(1575,24): Error TS2304: Cannot find name 'Buffer'.
I'm fairly new to Ionic2 so how would I go about importing this sdk to use?
Thanks in advance
SDK Link: https://www.npmjs.com/package/aws-sdk
Ionic 2: http://ionicframework.com/docs/v2/
Upvotes: 3
Views: 1265
Reputation: 485
None of the above solutions worked for me, For my case the following worked:
In your angular or ionic project run:
npm install aws-sdk --save
Before you can begin using these TypeScript definitions with your project, you need to make sure your project meets a few of these requirements:
npm install --save-dev @types/node
Upvotes: 0
Reputation: 133
To anyone else stuck trying to integrate AWS into ionic2 then please follow this link.
https://github.com/awslabs/aws-cognito-angular2-quickstart/issues/8
Vladimir Budilov at AWS was kind enough to share his repository.
Upvotes: 1