Search code examples
amazon-web-servicesreact-nativeaws-amplifycode-generation

DataStore - Models were generated with an unsupported version of codegen


I have a form where some values are taken and at the end some images are added through expo image picker. All of those informations are to be uploaded to AWS amplify so upon importing the models I suddenly receive a weird error I haven't seen before and it says enter image description here

The moment I comment the line where I import the model it doesn't show that error but then I can't upload to AWS.

import { DataStore } from "@aws-amplify/datastore";
import { House } from "../models";

Solution

  • The problem was coming from Codegen version being outdated I guess so running amplify upgrade then amplify codegen models upgraded the CLI and updated the codegen version therefore solving the issue