Unable to resolve "aws-sdk/clients/personalizeevents"
See original GitHub issueDescribe the bug A clear and concise description of what the bug is.
Adding Amplify to React Native, even when disabling analytics, tries to use analytics and fails from the aws-sdk.
Adding the aws-sdk helps, but that duplicates having the dependency.
To Reproduce Steps to reproduce the behavior: Adding amplify to a React Native project generate Configuring manually amplify.
Amplify.configure({
Auth: {
// REQUIRED - Amazon Cognito Identity Pool ID
identityPoolId: Cognito.IDENTITY_POOL_ID,
// REQUIRED - Amazon Cognito Region
region: Cognito.REGION,
// OPTIONAL - Amazon Cognito User Pool ID
userPoolId: Cognito.USER_POOL_ID,
identityPoolRegion: Cognito.REGION,
// OPTIONAL - Amazon Cognito Web Client ID (26-char alphanumeric string)
userPoolWebClientId: Cognito.APP_CLIENT_ID
// OPTIONAL - Enforce user authentication prior to accessing AWS resources or not
// mandatorySignIn: true
},
Analytics: {
disabled: true
}
});
React Native won’t start —
Unable to resolve "aws-sdk/clients/personalizeevents" from "node_modules/@aws-amplify/analytics/lib/Providers/AmazonPersonalizeProvider.js"
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
Sample code Include additional sample code or a sample repository to help us reproduce the issue. (Be sure to remove any sensitive data)
You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = ‘DEBUG’; in your app.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top GitHub Comments
I resolved this by adding
aws-sdk
to my installation. Does anyone have another solution?@nicksmithr the
aws-sdk/clients/personalizeevents
exists in theaws-sdk
version2.474.0
and when you install amplify, it will install that version for you. Please check yourpackage.json
andnode_modules
to make sure no other versions ofaws-sdk
exist. It would help a lot if you can paste thedependencies
anddevdependencies
of yourpackage.json
here.