Skip to content
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

No Amplify backend project files detected within this folder for a front end app #12569

Closed
2 tasks done
CharlesAondo opened this issue May 2, 2023 · 8 comments
Closed
2 tasks done
Labels
pending-triage Issue is pending triage platform-pull Issues related to `amplify pull`

Comments

@CharlesAondo
Copy link

How did you install the Amplify CLI?

curl -sL https://aws-amplify.github.io/amplify-cli/install | bash && $SHELL

If applicable, what version of Node.js are you using?

No response

Amplify CLI Version

11.1.1

What operating system are you using?

Mac OS

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes

Describe the bug

Amplify pull for front end app with no backend configured keep trying to pull the backend even though the application has no backend configuration. It gives this error ProjectNotInitializedError: No Amplify backend project files detected within this folder.

Expected behavior

Amplify pull should pull the application regardless of backend or not.

Reproduction steps

  1. create amplify app either with terraform or via ui
  2. Run amplify pull
  3. Select the app from the list
  4. You will get this error ProjectNotInitializedError: No Amplify backend project files detected within this folder

Project Identifier

No response

Log output

# Put your logs below this line

 

Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@CharlesAondo CharlesAondo added the pending-triage Issue is pending triage label May 2, 2023
@CharlesAondo CharlesAondo changed the title No Amplify backend project files detected within this folder No Amplify backend project files detected within this folder for a front end app May 2, 2023
@ykethan ykethan added the platform-pull Issues related to `amplify pull` label May 2, 2023
@ykethan
Copy link
Member

ykethan commented May 2, 2023

Hey @CharlesAondo, 👋 thank you for reaching. Wanted to confirm some information, are you expecting Amplify CLI to pull only the front-end from the application that does not have a backend created on AWS console?
This is currently not a supported workflow, Amplify pull will only pull your backend environments.

Curious on the error message ProjectNotInitializedError: No Amplify backend project files detected within this folder as in my reproduction in received a different message. running the pull command in empty directory provided me with 🛑 Cannot find backend environment in Amplify Console app: <app-name>

@ykethan ykethan added the pending-response Issue is pending response from the issue author label May 2, 2023
@CharlesAondo
Copy link
Author

CharlesAondo commented May 2, 2023

Hey @ykethan Yes, I was expecting the amplify pull command to work on frontend app with no backend. Any idea on how I can trigger a build from the CLI for a front end app in amplify? because if the project does not pull the build will fail. I will appreciate any idea of how I can trigger the build using terraform as-well because I am creating the app in terraform script. Thank you so much for your time.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label May 2, 2023
@ykethan
Copy link
Member

ykethan commented May 2, 2023

hey @CharlesAondo, you could try utilizing the incoming webhooks to trigger a build. For additional information, refer to https://docs.aws.amazon.com/amplify/latest/userguide/webhooks.html

could you let let us know how are you trying to pull the app locally? was this is in a empty directory or existing Amplify directory? was the pull command being utilized with any arguments?

cc: @hloriii

@ykethan ykethan added the pending-response Issue is pending response from the issue author label May 2, 2023
@CharlesAondo
Copy link
Author

It was in the-same directory as my terraform script, so it is not an amplify directory, they app was created with a terraform script. This is the full story when I run amplify pull ` amplify pull
? Select the authentication method you want to use: AWS profile

For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html

? Please choose the profile you want to use Amplify
? Which app are you working on? (Use arrow keys)
❯ Front End Dev (app-id)
Front End Production (app-id)

🛑 Cannot find backend environment in Amplify Console app: Front End Dev

Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

Session Identifier: a0e86c2f-**********************`

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label May 2, 2023
@ykethan
Copy link
Member

ykethan commented May 2, 2023

Hey @CharlesAondo, thank you for the information. If you require an additional information on the builds in AWS console. Please feel free in creating a issue on our amplify-hosting repository.
Closing the issue. Do reach out to us again if you require any assistance.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2023
@github-actions
Copy link

github-actions bot commented May 2, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@Jimgitsit
Copy link

Was this resolved? Did I miss something?

@justingatlin-ny
Copy link

I have the same problem.
When I try amplify pull or amplify add ap I get the response Cannot find backend environment in Amplify Console app:

I have not been able to create a back end or api yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-triage Issue is pending triage platform-pull Issues related to `amplify pull`
Projects
None yet
Development

No branches or pull requests

4 participants