#✅ - npx ampx generate not work for me when try to create model of my schema

7 messages · Page 1 of 1 (latest)

restive elk
#

on flutter, I did everything correct for setting up amplify. I followed the doc for createing aws account and amplify. However on creating model step, that npx ampx generate command is generating the initial Todo schema.

safe flower
#

Can you link to the docs page you're using? What are you trying to do that you're doing manual generation? Also, it sounds like doing manual generation would be pulling the data from a deployed backend, so if you had only deployed the todo schema, then that's all you would get from the output.

craggy moss
#

Hello @restive elk, I think you followed the QuickStart guide and you are mentioning after you change the schema file and run the codegen, it does not generate the code as expected. Is that correct?

I will release a video on this topic today or tomorrow.

restive elk
craggy moss
#

I have been through the QuickStart guide. All should be working as expected. We are tackling this via DMs now.

restive elk
#

I am really grateful to @craggy moss for helping me for at least 4 to 5 hours. I had been trying to fix the issue for maybe 3 weeks, creating 4 or 5 different AWS accounts from scratch. Eventually, he helped me and resolved it. I was really close to a mental breakdown! 😄

For newcomers like me, you must check your AWS IAM users. If there is no user, you can create one with the guide. After finding your access and secret access keys, you should configure your AWS file. Once that’s all done, check your config file to ensure that the regions match. In my case, my SSO profile and default profile were set to different regions—my IAM user was in the US, but the default was set to the EU. After configuring the AWS file, follow the quickstart documentation. When you run the npx ampx sandbox command, don’t terminate the sandbox when it says "WATCHING FOR FILE CHANGES." I didn’t know that with this watching functionality, when you update your data/resource.ts, it monitors your changes and generates the amplify_outputs.dart file. With this update, when you run the npx ampx generate command, you can create your models accurately.

vernal monolithBOT
#

✅ - npx ampx generate not work for me when try to create model of my schema