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
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";
2
Answers
The problem was coming from Codegen version being outdated I guess so running
amplify upgrade
thenamplify codegen models
upgraded the CLI and updated the codegen version therefore solving the issueI was on Amplify CLI version 6.3.1 and
amplify upgrade
had no effect.A simple reinstall did the trick: https://docs.amplify.aws/cli/start/install/