I am currently using nativescript 6.0.2 to build a cross-platform app and I need to be able to upload files to s3 using aws-cognito authentication to upload.
I have tried installing the javascript aws-sdk using npm install but I am getting these errors before the build.
ERROR in ../node_modules/aws-sdk/lib/credentials/process_credentials.js
Module not found: Error: Can't resolve 'child_process' in '/Users/nabhanmaswood/Desktop/Computer/Quadrant2/wowza-nativescript-plugin/demo-angular/node_modules/aws-sdk/lib/credentials'
@ ../node_modules/aws-sdk/lib/credentials/process_credentials.js 2:11-35
@ ../node_modules/aws-sdk/lib/node_loader.js
@ ../node_modules/aws-sdk/lib/aws.js
@ ./app/home/home.component.ts
@ ./app/home/home.module.ts
@ ../$$_lazy_route_resource lazy namespace object
@ ../node_modules/@angular/core/fesm5/core.js
@ ./app/app.module.ts
@ ./main.ts
ERROR in ../node_modules/aws-sdk/lib/publisher/index.js
Module not found: Error: Can't resolve 'dgram' in '/Users/nabhanmaswood/Desktop/Computer/Quadrant2/wowza-nativescript-plugin/demo-angular/node_modules/aws-sdk/lib/publisher'
@ ../node_modules/aws-sdk/lib/publisher/index.js 2:12-28
@ ../node_modules/aws-sdk/lib/node_loader.js
@ ../node_modules/aws-sdk/lib/aws.js
@ ./app/home/home.component.ts
@ ./app/home/home.module.ts
@ ../$$_lazy_route_resource lazy namespace object
@ ../node_modules/@angular/core/fesm5/core.js
@ ./app/app.module.ts
@ ./main.ts
ERROR in ../node_modules/xml2js/lib/parser.js
Module not found: Error: Can't resolve 'timers' in '/Users/nabhanmaswood/Desktop/Computer/Quadrant2/wowza-nativescript-plugin/demo-angular/node_modules/xml2js/lib'
@ ../node_modules/xml2js/lib/parser.js 17:17-34
@ ../node_modules/xml2js/lib/xml2js.js
@ ../node_modules/aws-sdk/lib/xml/node_parser.js
@ ../node_modules/aws-sdk/lib/node_loader.js
@ ../node_modules/aws-sdk/lib/aws.js
@ ./app/home/home.component.ts
@ ./app/home/home.module.ts
@ ../$$_lazy_route_resource lazy namespace object
@ ../node_modules/@angular/core/fesm5/core.js
@ ./app/app.module.ts
@ ./main.ts
I know that to use aws-sdk with nativescript you need the plugin nativescript-nodeify but the problem is that this plugin is not currently compatible with nativescript 6.0.2.
How would I fix this error or is there any other way I can use the aws-sdk to upload to s3 using cognito?
I know about the nativescript-aws-sdk plugin but that is ONLY for s3 and uses endpoints, access key and secret key when I NEED to use amazon cognito also.