mattferrin
mattferrin

Reputation: 607

Amplify CLI: An error occured during the push operation: Cannot read property 'extensions' of null

Is there a way to resolve this issue without deleting the project's amplify directory and beginning from scratch?

Steps to reproduce:

  1. Clone Git repository containing an Amplify CLI project
  2. Update Node version from 8.16.1 to 10.17.0 (nvm install 10.17)
  3. Update Amplify CLI version from 1.8.2 to 4.2.0 (npm i -g @aws-amplify/[email protected])
  4. Initialize Amplify (amplify init and choose existing environment)
  5. Deploy using Amplify CLI (amplify push)

Resulting error:

✖ An error occurred when pushing the resources to the cloud

Cannot read property 'extensions' of null An error occured during the push operation: Cannot read property 'extensions' of null

Upvotes: 2

Views: 2673

Answers (1)

mattferrin
mattferrin

Reputation: 607

A project root file named .graphqlconfig.yml was causing the error:

projects:
  myappname:
    schemaPath: src/graphql/schema.json
    excludes:
      - ./amplify/**
    extensions:
      amplify:
        graphQLApiId: xxxxxxxxxxxxxxxxxxxxxxxxxx
      endpoints:
        prod: >-
          https://xxxxxxxxxxxxxxxxxxxxxxxxxx.appsync-api.us-west-2.amazonaws.com/graphql

in our case, we installed Node version 12.13.1, used Amplify CLI version 4.4.0, and deleted the file. Then amplify push succeeded.

Upvotes: 1

Related Questions