Skip to content

Amplify Unhandled Rejection (TypeError): Cannot read properties of undefined (reading 'configure')

0

I'd like to use Amplify's Authenticator in a React project. I've installed the relevant packages using the following command: npm add --save-dev @aws-amplify/backend@latest @aws-amplify/backend-cli@latest typescript npm add @aws-amplify/ui-react

However, I'm encountering an error in the following code: import Amplify from 'aws-amplify'; import outputs from "../amplify_outputs.json"; Amplify.configure(outputs); Error:Unhandled Rejection (TypeError): Cannot read properties of undefined (reading 'configure')

I suspect there might be an issue with my Amplify configuration. I hope someone can help me with this.

asked 2 years ago1.1K views

1 Answer
2
Accepted Answer

Sorry,I solved it. import { Amplify } from 'aws-amplify'

answered 2 years ago

EXPERT

reviewed 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.