V
V
vasya0922022-01-10 13:22:57
Amazon Web Services
vasya092, 2022-01-10 13:22:57

How to fix amplify aws incompatibility error with React?

There is a problem with the fact that when deploying to AWS, an error is thrown during backend compilation:

JSONValidationError: File project: data should NOT have additional properties: 'graphqltransformer' at validator


There is information on the Internet that this means that the amplify installed for the project locally is newer than the amplify in the AWS console. How to change amplify version in Console Aws Amazon or see current version? Or maybe there is some other way to solve the error. Here is the complete error:
# Starting phase: build
2022-01-10T10:16:09.690Z [INFO]: File project: data should NOT have additional properties: 'graphqltransformer'
2022-01-10T10:16:09.690Z [INFO]: JSONValidationError: File project: data should NOT have additional properties: 'graphqltransformer'
                                 at validator (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-cli-core/lib/feature-flags/featureFlags.js:136:27)
                                 at featureFlagsValidator (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-cli-core/lib/feature-flags/featureFlags.js:140:17)
                                 at FeatureFlags.validateFlags (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-cli-core/lib/feature-flags/featureFlags.js:146:17)
                                 at FeatureFlags.loadValues (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-cli-core/lib/feature-flags/featureFlags.js:204:18)
                                 at async Function.FeatureFlags.initialize (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/node_modules/amplify-cli-core/lib/feature-flags/featureFlags.js:267:5)
                                 at async Object.run (/root/.nvm/versions/node/v12.21.0/lib/node_modules/@aws-amplify/cli/lib/index.js:73:9)
2022-01-10T10:16:09.695Z [ERROR]: !!! Build failed
2022-01-10T10:16:09.696Z [ERROR]: !!! Non-Zero Exit Code detected
2022-01-10T10:16:09.696Z [INFO]: # Starting environment caching...
2022-01-10T10:16:09.696Z [INFO]: # Uploading environment cache artifact...
2022-01-10T10:16:09.813Z [INFO]: # Environment caching completed
Terminating logging...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vasya092, 2022-01-10
@vasya092

For several days I could not figure it out, but now after the publication of the question everything turned out right away.
All you had to do was install the latest version of the Amplify CLI. To do this, you had to go to the Build settings section, after which in the Build image settings item you need to click on the Edit button. Then select Add package version override and define Amplify Cli as Latest version
61dc1a950ca96285159646.jpeg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question