Closed pfirmin closed 7 years ago
@pfirmin The SDK doesn't currently work with react-native. We have a PR up to add support, but need to work on our testing/deployment strategy before merging it in: https://github.com/aws/aws-sdk-js/pull/1393
Take a look at that PR, the README gives instructions on how to try out the SDK. Also would love any feedback you can give about the SDK in react-native.
Closing in favor of #740
I have to admit I am new too react-native projects. I am trying to test connecting to a dynamodb with the latest aws-sdk js. I keep getting the following error:
_(node:10215) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 819): UnableToResolveError: Unable to resolve module
events
from.../ReactProjects/AWSConnect/node_modules/aws-sdk/lib/http/xhr.js
: Module does not exist in the module map or in these directories: .../ReactProjects/AWSConnect/node_modules/aws-sdk/node_modules , .../ReactProjects/AWSConnect/nodemodulesif I restart and run-ios again I get essentially the same error:
_(node:10377) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 819): UnableToResolveError: Unable to resolve module
util
from..../ReactProjects/AWSConnect/node_modules/aws-sdk/lib/event_listeners.js
: Module does not exist in the module map or in these directories: ..../ReactProjects/AWSConnect/node_modules/aws-sdk/node_modules , .../ReactProjects/AWSConnect/nodemodulesTo reproduce the error: 1) I create the most basic react-native project on ios 2) run "npm install aws-sdk" (I have also tried with yarn and I have also tried older version by updating my package.json file with older version numbers) 3) in my main App.js file or in index.ios.js (Default) I add the dependancy var AWS = require('aws-sdk'); 4) without adding anything else I get the error above when I run "react-native run-ios"
Out of interest if it matters, here is how aws-sdk is listed in my package.json file. "dependencies": { "aws-sdk": "^2.34.0", "react": "15.4.2", "react-native": "0.42.3" },
Please let me know what I am doing wrong because I assume this is working for other people.
Thanks,