-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api/build//build/cloudformation-template.json and schema.graphql not created #13385
Comments
Hey @dan-hook, thank you for reaching out. Could you run |
Project Identifier: 04f83178cd073fa44470b41eeda4bb12 Running init with --debug prints out: I ran amplify push -y --debug and got an additional line: GraphQL transformer version: 2 Not pulling components because this project is not Amplify Studio enabled. |
Hey @dan-hook, Do you also observe the error message |
No, the current-cloud-backend has those cloudformation-template.json, so when I pull it shows up: |
@dan-hook, as a quick check, could you remove the |
|
Hey @dan-hook, tried reproducing the issue but did not observe this error message |
@ykethan Thanks for the effort you've put in. I don't think we're going to resolve this, so I'll close this issue and work around it. |
|
@dan-hook would you be open for a call? want to make sure i document this behavior. |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v20.9.0
Amplify CLI Version
12.7.1, but also tried 11.1.1
What operating system are you using?
Ubuntu on WSL2
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes, but many custom resources in the application
Describe the bug
In a fresh checkout of my project, I run
amplify init --appId d1g66d3b03y7li
? Do you want to use an existing environment? Yes
? Choose the environment you would like to use: qa
Using default provider awscloudformation
✔ Initialized provider successfully.
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
✅ Initialized your environment successfully.
Then I run amplify push, which operates normally, but it gets to:
✔ Are you sure you want to continue? (Y/n) · yes
Installing dependencies from Pipfile.lock (ca2f74)...
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Could not read cloudformation template at path: /workspaces/gene-panel-api/project/amplify/backend/api/genepanelapi/build/cloudformation-template.json
Additionally, api/project/amplify/backend/api/genepanelapi/build/schema.graphql is also not created, which means codegen won't work.
WORKAROUND
If I edit my schema.graphql to add an extra line, everything works as expected.
I could also probably copy the files from current-cloud-backend.
Expected behavior
If the api/build directory is missing, it should be rebuilt completely, including schema.graphql and cloudformation-template.json.
This originally came up because I'm deploying this app in Github Actions. I checkout the code, push it, then use the generated typescript queries and mutations to run tests on the deployed API. There's value in running the tests even if schema.graphql hasn't changed because some of the Lambda functions that back the resolvers may have changed.
Reproduction steps
Create an amplify app with a graphql API. Deploy it. Commit to git (using the default .gitignore ) that leaves out the build directory. Check it out into a fresh directory, and run amplify init and amplify push as described in the bug.
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: