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
已提問 5 年前檢視次數 252 次
3 個答案
0

Question was answered after e-mailing support.

jzou
已回答 5 年前
0

Can you please share the solution?

已回答 4 年前
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
已回答 9 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南