question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to resolve "aws-sdk/clients/personalizeevents"

See original GitHub issue

Describe 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
mackattack3kcommented, Jul 24, 2019

I resolved this by adding aws-sdk to my installation. Does anyone have another solution?

1reaction
powerful23commented, Jun 21, 2019

@nicksmithr the aws-sdk/clients/personalizeevents exists in the aws-sdk version 2.474.0 and when you install amplify, it will install that version for you. Please check your package.json and node_modules to make sure no other versions of aws-sdk exist. It would help a lot if you can paste the dependencies and devdependencies of your package.json here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

@aws-sdk/client-personalize-events - npm
AWS SDK for JavaScript Personalize Events Client for Node.js, Browser and React Native. Latest version: 3.236.0, last published: 2 minutes ago.
Read more >
Amazon Personalize Events examples using SDK for ...
Code examples that show how to use AWS SDK for JavaScript V3 with Amazon Personalize Events.
Read more >
Class: Aws::PersonalizeEvents::Client — AWS SDK for Ruby V3
Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::PersonalizeEvents::EndpointParameters.
Read more >
Code examples for Amazon Personalize Events using AWS ...
Code examples that show how to use Amazon Personalize Events with an AWS SDK.
Read more >
Class: AWS.PersonalizeEvents — AWS SDK for JavaScript
Amazon Personalize can consume real-time user event data, such as stream ... and retry requests that fail because of an skewed client clock....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found