AWS Console Build Problem

0

I am currently having a strange problem with my build in the Amplify Console in which the first build performed by the console works only upon the first connection with any individual branch within the repo. Any subsequent builds will fail on the backend step of the build with the following error message:

Error: You are not working inside a valid amplify project.
Use 'amplify init' in the root of your app directory to initialize your project with Amplify

I observed that the first successful build would successfully create the Amplify environment, but subsequent builds would fail to do so. I am stuck as to what is possibly causing this problem. I have already deleted and reinitialized Amplify in my app, and I don't believe there is anything strange with the build settings I am working with. Can anyone offer any help regarding this?

My build settings:
https://gist.github.com/zoumengguang/c2a9d904674fccbfae37b759ff865280

The build logs:
https://gist.github.com/zoumengguang/8edb3901c0d2feb1c21504c31024079d

Thanks in advance.

jzou
asked 5 years ago234 views
3 Answers
0

Question was answered after e-mailing support.

jzou
answered 5 years ago
0

Can you please share the solution?

answered 4 years ago
0

The error message "You are not working inside a valid amplify project" indicates that you are trying to run an Amplify command outside of a directory that has been set up as an Amplify project. To resolve this issue, you should navigate to the root directory of your Amplify project before running Amplify commands. Here's how you can fix it:

Navigate to Your Amplify Project Directory:

Open your terminal or command prompt and use the cd command to navigate to the root directory of your Amplify project. This is the directory where you previously ran amplify init to set up your project.

For example:

cd /path/to/your/amplify/project

Replace /path/to/your/amplify/project with the actual path to your project directory.

Run Amplify Commands:

Once you are inside the correct directory, you can run Amplify commands. For example, you can run:

amplify status

This should work without giving you the "not a valid amplify project" error.

Check Amplify Configuration:

If you are sure you are in the correct project directory but still encounter this error, it's possible that there might be an issue with your Amplify project's configuration. Make sure that the amplify command line tool is installed and up to date. You can update it using:

npm install -g @aws-amplify/cli

Also, double-check that the amplify directory and configuration files (such as amplify/team-provider-info.json, amplify/.config/local-aws-info.json, etc.) are present in your project directory.

AWS
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions