Search code examples
amazon-web-servicesaws-amplify

AWS amplify Can't resolve '@aws-amplify/core'


As the title suggests, when I run npm start in my project folder the I get the following error:

Module not found: Can't resolve '@aws-amplify/core' in '/Users/xxxxxx/Desktop/react-amplified/node_modules/@aws-amplify/api/lib-esm'

The project is literally the template code created by npx create-react-app react-amplified cd react-amplified

I tried installing @aws-amplify/core directly but that didn't work.


Solution

  • Take a look at https://docs.amplify.aws/start/getting-started/installation/q/integration/react#option-1-watch-the-video-guide

    When scaffolding a new react app, there are a few steps beyond npx create-react-app that need to be run to Amplify your project.

    1. amplify configure to setup your amplify cli
    2. amplify init to initialize your backend resources in AWS.